[R] Several Lattice plots in one Plot

Marcus Drescher drescher at tum.de
Thu Sep 30 09:35:15 CEST 2010


Hi all,

I've been trying for hours, but I do not find a Solution. I want to plot 12 variables over time in separate diagrams in one plot/window using lattice. Two columns, six rows. I used print with the split command, but the graphics are getting really small. Can someone please help me.

Following data example:
dta = data.frame(
            day=c(1,2,3,4,5,6,7),
            var11=c(1,2,2,4,5,3,2),
            var12=c(1,2,2,4,5,3,2),
            var13=c(1,2,2,4,5,3,2),
            var14=c(1,2,2,4,5,3,2),
            var15=c(1,2,2,4,5,3,2),
            var16=c(1,2,2,4,5,3,2),
            var17=c(1,2,2,4,5,3,2),
            var18=c(1,2,2,4,5,3,2),
            var19=c(1,2,2,4,5,3,2),
            var10=c(1,2,2,4,5,3,2),
            var11=c(1,2,2,4,5,3,2),
            var12=c(1,2,2,4,5,3,2))

Any idea how I can plot varXX over day like xyplot(var11 ~ day, data=dta, type='b', scales=list(cex=0.5), xlab=NULL, ylab=list(cex=0.5)) and get readable graphs?

Thanks in advance.
Marcus



More information about the R-help mailing list