Is it possible to plot (and save) only the legend of a lattice plot? Of course I could make the axes and axis labels transparent and use an empty panel function, but additionally to being a very "dirty" solution, there would be still a lot of free space on the plot, while I would like to save only the legend as a separate plot without any white space around it. Is there a (nice) way to do this? -- View this message in context: http://r.789695.n4.nabble.com/lattice-print-only-legend-tp4650269.html Sent from the R help mailing list archive at Nabble.com.
[lattice] print only legend
2 messages · AnjaM, David Winsemius
On Nov 21, 2012, at 1:45 AM, AnjaM wrote:
Is it possible to plot (and save) only the legend of a lattice plot? Of course I could make the axes and axis labels transparent and use an empty panel function, but additionally to being a very "dirty" solution, there would be still a lot of free space on the plot, while I would like to save only the legend as a separate plot without any white space around it. Is there a (nice) way to do this?
If you read the help page: ? xyplot ... it should not be too hard to find the section that names the grid function that draws a key. Unsurprisingly, it is `draw.key`.
David Winsemius, MD Alameda, CA, USA