# multiple plots in single frame: 2 upper, 1 lower

6 messages
Open this post in threaded view
|

## multiple plots in single frame: 2 upper, 1 lower

 Hi, par(mfrow = c(2,2)) will create a 2x2 window that I can use to plot 4 diferent figures in: [plot1 plot2] [plot3 plot4] But how can do 3 so that the bottom spans the width of the upper two: [plot1 plot1] [p   l  o  t 3] Is this possible in R?
Open this post in threaded view
|

## Re: multiple plots in single frame: 2 upper, 1 lower

 Hi, Try looking at ?layout.  Here is a simple example: layout(matrix(c(1, 2, 3, 3), 2, byrow = TRUE)) plot(1:10); plot(11:20); plot(21:40) Cheers, Josh On Tue, Jul 19, 2011 at 4:07 PM, DrCJones <[hidden email]> wrote: > Hi, > > par(mfrow = c(2,2)) > > will create a 2x2 window that I can use to plot 4 diferent figures in: > [plot1 plot2] > [plot3 plot4] > > But how can do 3 so that the bottom spans the width of the upper two: > > [plot1 plot1] > [p   l  o  t 3] > > Is this possible in R? > > -- > View this message in context: http://r.789695.n4.nabble.com/multiple-plots-in-single-frame-2-upper-1-lower-tp3679574p3679574.html> Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > [hidden email] 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. > -- Joshua Wiley Ph.D. Student, Health Psychology University of California, Los Angeles https://joshuawiley.com/______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
Open this post in threaded view
|

## Re: multiple plots in single frame: 2 upper, 1 lower

 In reply to this post by DrCJones DrCJones wrote But how can do 3 so that the bottom spans the width of the upper two: [plot1 plot1] [p   l  o  t 3] ?layout for standard graphics (plot..), but that's what you are referring to. For trellis, you must use other methods. Dieter
Open this post in threaded view
|

## Re: multiple plots in single frame: 2 upper, 1 lower

 In reply to this post by DrCJones On 20/07/11 11:07, DrCJones wrote: > Hi, > > par(mfrow = c(2,2)) > > will create a 2x2 window that I can use to plot 4 diferent figures in: > [plot1 plot2] > [plot3 plot4] > > But how can do 3 so that the bottom spans the width of the upper two: > > [plot1 plot1] > [p   l  o  t 3] > > Is this possible in R? In R ***anything*** is possible. :-) Your requirement is no only possible, but easy! See ?layout You may have to expend a bit of effort to understand the syntax, but that will be good for your karma. :-)  It ***will*** do exactly what you want, if you ask it nicely.      cheers,          Rolf Turner ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.