[R] Trellis plot in multiple display with grid

Marco Chiarandini machud at inferenzsysteme.informatik.tu-darmstadt.de
Sun Mar 21 19:08:19 CET 2004


Dear all,

I would like to plot a multipanel display. Each plot should have the
curve over time of the solution produced by 10 different algorithms
(groups of data).

I handle this with:


xyplot(quality~time | inst, data=profiles, groups=alg,
       panel=panel.superpose,
       type=c("s"),
       as.table=TRUE,
       scales=list(relation="free",rot=c(0,90),cex=0.8),
       layout=c(3,3),
       main=list(label="Run time profile",cex=1.3),
       xlab=list(label="Normalised time",cex=1.3),
       ylab=list(label="Number of colours",cex=1.3),
       par.strip.text=list(cex=0.9),
       key=list(columns=1,cex=1,space="right",
         text=list(levels(as.factor(profiles$alg))),
         #points=Rows(sps,1:9),
         lines=Rows(spl,1:9)
         )
       )



My problems come when I try to add a grid to each of these plots.
I call this:


xyplot(quality~time | inst, data=profiles, groups=alg,
       #panel=panel.superpose,

       panel=function(x,y)
       {
         panel.grid(h = -1, v = -1, lty = 2)
         panel.xyplot(x,y,type=c("s"))
       },
       as.table=TRUE,
       scales=list(relation="free",rot=c(0,90),cex=0.8),
       layout=c(3,4),
       main=list(label="Run time profile",cex=1.3),
       xlab=list(label="Normalised time",cex=1.3),
       ylab=list(label="Number of colours",cex=1.3),
       par.strip.text=list(cex=0.9),
       key=list(columns=1,cex=1,corner=c(1,0),x=0.9,y=0.07,
         text=list(levels(as.factor(profiles$alg))),
         #points=Rows(sps,1:9),
         lines=Rows(spl,1:9)
         )
       )


but the result is that I am not anymore able to recognize the different
algorithms in each sinlge plot.

Is there anyone who can help me?


Thank you,


Marco Chiarandini


--
Marco Chiarandini, Fachgebiet Intellektik, Fachbereich Informatik,
Technische Universität Darmstadt, Alexanderstrasse 10,
D-64283 Darmstadt - Germany, Office: S1/15 Raum 118
Tel: +49 (0)6151 16-6802 Fax: +49 (0)6151 16-5326
email: machud at intellektik.informatik.tu-darmstadt.de
web page: http://www.intellektik.informatik.tu-darmstadt.de/~machud




More information about the R-help mailing list