[R] Trellis plot in multiple display with grid

Marco Chiarandini machud at inferenzsysteme.informatik.tu-darmstadt.de
Sun Mar 21 20:23:48 CET 2004


Thank you a lot! It works exactly as I desired.

I dare to ask you another detail about Trellis multiple display plots.
I would like to plot vertical lines in correspondence of the confidence
intervals with the function below in order to make easier the visual
comparison.

Is this possible? I tried using the same logic proposed in the previous
answer but it does not work.


 Dotplot(as.factor(alg) ~ Cbind(y,lower,upper) | class,
         data=all,subset=ss,
           pch=3,method="bars",pch.bar=2,
         # panel=function(x,y,...) {
         #   panel.abline(v=y)
         #   panel.superpose(x,y,...)
         # },
          scales = list(cex=1,
             x=list(relation="free"),
             y=list(alternating=c(1,1,1,1),
               labels=c(levels(all$alg)),
               at=c(1:nlevels(all$alg)))),
           main=list(cex=1.3,label="Multiple comparisons with Tukey's
                confidence intervals"),
           xlab=list(label="Percentage deviation from best
                   results",cex=1.3,between.columns=5,distance=rep(2,60),size=3),
           ylab="",
           aspect=0.6,as.table=TRUE);




On Sun, 21 Mar 2004, Deepayan Sarkar wrote:

> 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
>

--
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