Skip to content

lattice/ grid.layout/ multiple graphs per page

2 messages · McClatchie, Sam (PIRSA-SARDI), Deepayan Sarkar

#
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><<
#
On 7/27/05, McClatchie, Sam (PIRSA-SARDI)
<mcclatchie.sam at saugov.sa.gov.au> wrote:
Depends on the details of your 'working trellis code'. Are you using
print() explicitly with 'newpage=FALSE'? See ?print.trellis for
details.

Deepayan