|
Hello all,
I have a problem and need your help. I am going to draw two plots in one row and two columns by using “par(mfrow=c(1,2))”, but I want to first draw the right plot and then draw the left plot. Does anybody can show me how to do it please? Thanks in advance. Legen |
|
I think you can try this:
par(mfrow=c(1,2)) plot(1, type = 'n', axes = FALSE, xlab = '', ylab = '') plot(1, type = 'n', axes = FALSE, xlab = '', ylab = '') par(mfg = c(1, 2)) plot(rnorm(10)) On Thu, Sep 10, 2009 at 1:49 AM, legen <[hidden email]> wrote: > > Hello all, > > I have a problem and need your help. > I am going to draw two plots in one row and two columns by using > par(mfrow=c(1,2)), but I want to first draw the right plot and then draw > the left plot. Does anybody can show me how to do it please? Thanks in > advance. > > Legen > > -- > View this message in context: > http://www.nabble.com/Order-of-multiple-plots-tp25377235p25377235.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. > -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40" S 49° 16' 22" O [[alternative HTML version deleted]] ______________________________________________ [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. |
|
In reply to this post by legen
Rather than use par(mfro...) you should probably take a look at the alternative "layout" approach. That allows you to give R a matrix (corresponding to panels in the plot) containing the number of the plot to be placed in each panel.
It also allows unequal panel sizes. See ?layout for details. Steve E >>> legen <[hidden email]> 10/09/2009 05:49:04 >>> Hello all, I have a problem and need your help. I am going to draw two plots in one row and two columns by using par(mfrow=c(1,2)), but I want to first draw the right plot and then draw the left plot. Does anybody can show me how to do it please? Thanks in adv ******************************************************************* This email and any attachments are confidential. Any use...{{dropped:8}} ______________________________________________ [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. |
|
In reply to this post by legen
'Layout' is the way to go. You can define a layout as:
LO <- layout(matrix(c(1, 2, 3, 4), ncol=2)) In your case, you would probably want to use: layout(matrix(c(2, 1), ncol=2)) Then, the first plot will be drawn in space number 2, and then the second plot will be drawn in space number 1. Hope this helps. -Nandi On Sep 9, 11:49 pm, legen <[hidden email]> wrote: > Hello all, > > I have a problem and need your help. > I am going to draw two plots in one row and two columns by using > “par(mfrow=c(1,2))”, but I want to first draw the right plot and then draw > the left plot. Does anybody can show me how to do it please? Thanks in > advance. > > Legen > > -- > View this message in context:http://www.nabble.com/Order-of-multiple-plots-tp25377235p25377235.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > [hidden email] mailing listhttps://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. ______________________________________________ [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. |
| Powered by Nabble | Edit this page |
