Re: [R] Splitting device for ggplots?

From: Vitalie Spinu <vitosmail_at_rambler.ru>
Date: Mon, 03 Nov 2008 10:00:05 +0100

Thanks Baptiste and Hadley,

That viewports mechanism is indeed extremely versatile when it comes to publication or designing new plot functions. But for interactive analysis all these "pushing" and "popping" is just a way too much code - for each plot at least two additional grid functions, one plot variable and explicit print with location are required. For just 10 plots it's already a page or so of redundant code.

It would be really wonderful if classic mfrow or layout mechanism were implemented for lattice and ggplots.

The simplest trick I could think of for myself is to overwrite the print method for ggplots and to append execution of a custom function (gg.postplot say) which would do "popping" and "pushing" into next sell in grid.layout.

Vitalie.

On Sat, 01 Nov 2008 15:26:36 +0100, hadley wickham <h.wickham_at_gmail.com> wrote:

> On Sat, Nov 1, 2008 at 5:13 AM, baptiste auguie <ba208@exeter.ac.uk>
> wrote:
>> Hi,
>>
>> I believe you can apply the same procedure as described in Paul
>> Murrell's "R
>> graphics" book for arranging lattice plots.
>
> Yup, and see also http://had.co.nz/ggplot2/book/grid.pdf
>
> Hadley
>
>



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. Received on Mon 03 Nov 2008 - 09:02:24 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 03 Nov 2008 - 21:30:20 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive