[R] Set the grid.layout programmatically?

Paul Murrell p.murrell at auckland.ac.nz
Mon Dec 10 21:27:13 CET 2007


Hi


Felipe Carrillo wrote:
> Hello all:
> Does anyone know if the grid layout function can be
> set dynamically? For example if I have a column that
> will be changing as new data is added monthly I would
> like grid to detect the new data and create another
> row or column for the new plot on the same window
> instead of adding the new layout manually. The code
> below shows a grid.layout of hardcoded two rows and
> two columns.Thanks
> 
> pushViewport(viewport(layout=grid.layout(2,2))) 


Take a look at grid.frame()

Paul


> Felipe D. Carrillo
>   Fishery Biologist
>   US Fish & Wildlife Service
>   California, USA
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

-- 
Dr Paul Murrell
Department of Statistics
The University of Auckland
Private Bag 92019
Auckland
New Zealand
64 9 3737599 x85392
paul at stat.auckland.ac.nz
http://www.stat.auckland.ac.nz/~paul/



More information about the R-help mailing list