Hello,
I''m using R2HTML library to make a HTML page output (both data frames
and
graphics):
HTMLStart(outdir=paste(getwd(),"/prove html", sep =
""),filename="index",
echo = F, HTMLframe = T, withprompt = "HTML> ", CSSFile =
"R2HTML.CSS",
Title = "Indici di attivit?")
...
barplot(tab41[,2],main="...",ylab="%",names.arg=rownames(tab41),cex.names=0.
7)
grid(nx=0,ny=NULL,lty=2)
barplot(tab41[,3],main="...",ylab="",names.arg=rownames(tab41),cex.names=0.7
)
grid(nx=0,ny=NULL,lty=2)
barplot(tab41[,4],main="...",ylab="giorni",names.arg=rownames(tab41),cex.nam
es=0.7)
grid(nx=0,ny=NULL,lty=2)
HTMLplot(Caption=paste("Indici di attivit? - centro
n.",cod.centro),GraphDirectory = get(".HTML.outdir", env =
get("HTMLenv",
envir = .GlobalEnv)), GraphFileName = "ind-pos",Align =
"center")
But I get this error:
Error in dev.print(png, file = AbsGraphFileName, width = 400) :
can only print from screen device
Execution halted
Can anyone help me?
Thanks
HTMLplot is documented to
Exports the active graphic to a JPEG or GIF file and add it to a
target HTML output, by writing the <IMG> tag.
but the code uses dev.print which is intended to *printing* from a screen
device. Please send report to the author of R2HTML: he probably should be
using dev.copy.
I presume you are doing this in a script and so your current device is
a postscript device.
On Mon, 31 Mar 2003, Gianluca Emireni wrote:
> Hello,
> I''m using R2HTML library to make a HTML page output (both data
frames and
> graphics):
>
> HTMLStart(outdir=paste(getwd(),"/prove html", sep =
""),filename="index",
> echo = F, HTMLframe = T, withprompt = "HTML> ", CSSFile =
"R2HTML.CSS",
> Title = "Indici di attivit?")
> ...
>
>
barplot(tab41[,2],main="...",ylab="%",names.arg=rownames(tab41),cex.names=0.
> 7)
> grid(nx=0,ny=NULL,lty=2)
>
barplot(tab41[,3],main="...",ylab="",names.arg=rownames(tab41),cex.names=0.7
> )
> grid(nx=0,ny=NULL,lty=2)
>
barplot(tab41[,4],main="...",ylab="giorni",names.arg=rownames(tab41),cex.nam
> es=0.7)
> grid(nx=0,ny=NULL,lty=2)
>
> HTMLplot(Caption=paste("Indici di attivit? - centro
> n.",cod.centro),GraphDirectory = get(".HTML.outdir", env =
get("HTMLenv",
> envir = .GlobalEnv)), GraphFileName = "ind-pos",Align =
"center")
>
> But I get this error:
>
> Error in dev.print(png, file = AbsGraphFileName, width = 400) :
> can only print from screen device
> Execution halted
>
> Can anyone help me?
> Thanks
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
>
>
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
Hello,
I'm using R2HTML library to make a HTML page output (both data frames and
graphics):
HTMLStart(outdir=paste(getwd(),"/prove html", sep =
""),filename="index",
echo = F, HTMLframe = T, withprompt = "HTML> ", CSSFile =
"R2HTML.CSS",
Title = "Indici di attivit?")
...
barplot(tab41[,2],main="...",ylab="%",names.arg=rownames(tab41),cex.names=0.
7)
grid(nx=0,ny=NULL,lty=2)
barplot(tab41[,3],main="...",ylab="",names.arg=rownames(tab41),cex.names=0.7
)
grid(nx=0,ny=NULL,lty=2)
barplot(tab41[,4],main="...",ylab="giorni",names.arg=rownames(tab41),cex.nam
es=0.7)
grid(nx=0,ny=NULL,lty=2)
HTMLplot(Caption=paste("Indici di attivit? - centro
n.",cod.centro),GraphDirectory = get(".HTML.outdir", env =
get("HTMLenv",
envir = .GlobalEnv)), GraphFileName = "ind-pos",Align =
"center")
But I get this error:
Error in dev.print(png, file = AbsGraphFileName, width = 400) :
can only print from screen device
Execution halted
Can anyone help me?
Thanks
______________________________________________
R-help at stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Hello Gianluca,
save your graph as jpg-file first and then include it in your html-file
like:
HTMLInitFile(...)
.
.
.
HTML("<img src=\"Filename.jpg\"
border=\"2\">")
.
.
.
HTMLEndFile()
HTH,
Bernhard
----------------------------------------------------------------------
If you have received this e-mail in error or wish to read our e-mail
disclaimer statement and monitoring policy, please refer to
http://www.drkw.com/disc/email/ or contact the sender.
----------------------------------------------------------------------