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

McClatchie, Sam (PIRSA-SARDI) mcclatchie.sam at saugov.sa.gov.au
Thu Jul 28 05:13:34 CEST 2005


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 at 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><<




More information about the R-help mailing list