[R] tkrplot with grid lattice plots

Eric ESPOSITO eric.esposito at gazdefrance.com
Mon Dec 8 12:18:13 CET 2003


Hello,
i tried to use a lattice graphics with tkrplot it seems that it doen't
work, here is the exemple used:

> library(tkrplot)
> tt <- tktoplevel()
> tktitle(tt)<-"Exemple"
>
> randdata<-data.frame(x=rnorm(100), y=rnorm(100), idobs=rep(1:10,
each=10))
>
> plot.graph<-function() {
+ plot(randdata$x, randdata$y)
+ }
>
> plot.graph2<-function() {
+ print(xyplot(x ~ y | idobs, data = randdata, as.table=F, type="p",
panel=panel.xyplot, main="", lty=1))
+ }
>
> img <-tkrplot(tt, fun=plot.graph)
> tkgrid(img)
<Tcl>
> img2 <-tkrplot(tt, fun=plot.graph2)
Error in check.length(gparname) : gpar element fontsize must not be length
0


I had a look at the tkrplot function but can't understand what is wrong.
Thanks for any help!

Eric Esposito




More information about the R-help mailing list