[R] Construct plot combination using grid without plotting and retrieving an object?

Johannes Graumann johannes_graumann at web.de
Fri May 24 10:24:55 CEST 2013


I'm currently combining multiple plots using something along the lines 
of the following pseudo-code:

tmpLayout <- grid.layout(
pushViewport(viewport(layout = tmpLayout))

and than proceeding with filling the viewports ... works fine, but for 
packaging of functions I would really prefer if I could assemble all of 
this in an object which in the end would be callable with "print".

I'm envisioning something along the lines of what I can do with 
ggplot2: return a plot as a ggpplot object and plot it later rather 
than as I assemble it. Is that possible with a complex grid figure?

Thanks for any pointers.


More information about the R-help mailing list