[R] xyplot Legend Title and Position
Justin McBride
crazyhawk48 at gmail.com
Wed Jun 15 01:36:37 CEST 2011
Dear R Community,
I'm using xyplot in Lattice with a legend and a title on the legend.
The title on legend is being cut off, as can be seen by running the
code below. The legend is on the right, but I would like to get to
the top right of the graphics window. Is there a way to get the
legend title to display correctly and move the whole legend up the the
top right?
Thanks,
Justin
### R code
library(lattice)
Yield=c(16, 17, 11, 8, 16, 18)
Date = c(1, 1, 2, 3, 4, 5)
Machine = c(1, 3, 2, 2, 3, 1)
xyplot(Yield ~ Date,
groups=Machine,
auto.key=list(title="Machine", space = "right", cex=1.0),
par.settings = list(superpose.symbol=list(pch = 0:18, cex=1)),
)
More information about the R-help
mailing list