[R] lattice/ grid.layout/ multiple graphs per page
Deepayan Sarkar
deepayan.sarkar at gmail.com
Thu Jul 28 20:14:11 CEST 2005
On 7/27/05, McClatchie, Sam (PIRSA-SARDI)
<mcclatchie.sam at saugov.sa.gov.au> wrote:
> 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?
Depends on the details of your 'working trellis code'. Are you using
print() explicitly with 'newpage=FALSE'? See ?print.trellis for
details.
Deepayan
> 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><<
>
> ______________________________________________
> R-help at 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
>
More information about the R-help
mailing list