[R] Trellis plot in multiple display with grid
Deepayan Sarkar
deepayan at stat.wisc.edu
Sun Mar 21 20:10:32 CET 2004
On Sunday 21 March 2004 12:08, Marco Chiarandini wrote:
> 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"))
> },
Instead, try
panel=function(x,y,...)
{
panel.grid(h = -1, v = -1, lty = 2)
panel.superpose(x,y,...)
},
type = "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
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
More information about the R-help
mailing list