Benjamin Tyner
2007-Jan-22 21:18 UTC
[R] lattice: put key where unused panel would have been
Hi, Say I have z<-data.frame(y=runif(190), x=runif(190), f=gl(5,38), g=gl(19,10)) plot<-xyplot(y~x|g, data=z, layout=c(5,4), groups=f, auto.key=TRUE) How might one place the key in the empty space where the twentieth panel would have been? Thanks, Ben
Sundar Dorai-Raj
2007-Jan-22 23:50 UTC
[R] lattice: put key where unused panel would have been
Benjamin Tyner said the following on 1/22/2007 3:18 PM:> Hi, > > Say I have > > z<-data.frame(y=runif(190), > x=runif(190), > f=gl(5,38), > g=gl(19,10)) > > plot<-xyplot(y~x|g, > data=z, > layout=c(5,4), > groups=f, > auto.key=TRUE) > > How might one place the key in the empty space where the twentieth panel > would have been? > > Thanks, > Ben > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.You can try supplying x and y coordinates to auto.key xyplot(y ~ x | g, data = z, layout = c(5, 4), groups = f, auto.key = list(x = .85, y = .9)) HTH, --sundar