[R] lattice/ grid.layout/ multiple graphs per page

From: McClatchie, Sam (PIRSA-SARDI) <mcclatchie.sam_at_saugov.sa.gov.au>
Date: Thu 28 Jul 2005 - 13:13:34 EST


Background:
OS: Linux Mandrake 10.1
release: R 2.0.0
editor: GNU Emacs 21.3.2
front-end: ESS 5.2.3



Colleagues

I have a set of lattice plots, and want to plot 4 of them on the page. I am having trouble with the layout.

grid.newpage()
pushViewport(viewport(layout = grid.layout(2,2)))
pushviewport(viewport(layout.pos.col = 1, layout.pos.row = 1))
working trellis graph code here
pushviewport(viewport(layout.pos.col = 1, layout.pos.row = 2)) working trellis graph code here
pushviewport(viewport(layout.pos.col = 2, layout.pos.row = 1))
working trellis graph code here
pushviewport(viewport(layout.pos.col = 2, layout.pos.row = 2))

I'm obviously doing something wrong since my graphs still print one per page?

Would you be able to provide advice?

Thanks

Sam



Sam McClatchie,
Biological oceanography
South Australian Aquatic Sciences Centre PO Box 120, Henley Beach 5022
Adelaide, South Australia
email <mcclatchie.sam@saugov.sa.gov.au>
Telephone: (61-8) 8207 5448
FAX: (61-8) 8207 5481
Research home page <
http://www.members.iinet.net.au/~s.mcclatchie/>   
                   /\

...>><xX(>
//// \\\\ <)Xx><< ///// \\\\\\ ><(((>

  >><(((> ...>><xX(>O<)Xx><<

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Jul 28 13:17:07 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:34:06 EST