[R] question about adding plots in a grid (lattice package)

Deepayan Sarkar deepayan.sarkar at gmail.com
Fri Jun 19 19:07:44 CEST 2009


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




More information about the R-help mailing list