Re: [R] Multi-plot figures with different numbers of plots indifferentrows

From: Earl F. Glynn <>
Date: Wed 30 Mar 2005 - 08:59:58 EST

"Paul Murrell" <> wrote in message news:<>...
> Does this do what you want?
> layout(rbind(c(1, 2, 3),
> c(0, 4, 0)))
> plot(1:10, main="Plot 1")
> plot(1:20, main="Plot 2")
> plot(1:30, main="Plot 3")
> plot(1:40, main="Plot 4")
> # new page!
> plot(1:40, main="Plot 5")

Yes, that works nicely. Thank you very much.

I tried this wrapped with a pdf/ and it works great:

  <plot statements here>

I guess I should always use layout and avoid using mfrow or mfcol, since it's more flexible in general.

I can't decide if the existing behavio(u)r of mfrow/mfcol is a "bug" or a "feature" when some plots are to be left blank, and one wants to advance to the next figure. With your solution, I won't need to care <g>. Thanks.

efg mailing list PLEASE do read the posting guide! Received on Wed Mar 30 09:09:45 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:30:57 EST