Marion Dumas
2009-Jun-16 14:22 UTC
[R] question about adding plots in a grid (lattice package)
Hello! I am starting to use the lattice package. I generated an xyplot conditioned on a factor that has three levels: hence I get three plots in three panels spaces and one is left empty. I would like to add a plot to the empty panel space. Is it possible? Thank you
Deepayan Sarkar
2009-Jun-19 17:07 UTC
[R] question about adding plots in a grid (lattice package)
On 6/16/09, Marion Dumas <mariouka at gmail.com> wrote:> Hello! > I am starting to use the lattice package. I generated an xyplot conditioned > on a factor that has three levels: hence I get three plots in three panels > spaces and one is left empty. I would like to add a plot to the empty panel > space. Is it possible?Yes. The easiest way depends on what you would like to add. If it's another lattice plot, then use the 'split' or 'position' arguments in ?print.trellis. More generally, you can set up a grid viewport there and add whatever you need (for base graphics, you would need the gridBase package). -Deepayan