Re: [R] par(mfror=c(1,2))

From: Greg Snow <Greg.Snow_at_intermountainmail.org>
Date: Tue 02 May 2006 - 02:35:13 EST


One simple solution is to use the layout function in place of par.

For example:

> layout(rbind(c(0,1,1,0),c(0,2,2,0)))
> hist(rnorm(100))
> hist(rnorm(10000))

Hope this helps,

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow@intermountainmail.org
(801) 408-8111
 

-----Original Message-----
From: r-help-bounces@stat.math.ethz.ch [mailto:r-help-bounces@stat.math.ethz.ch] On Behalf Of Stefan Semmeling
Sent: Friday, April 28, 2006 2:08 AM
To: r-help@stat.math.ethz.ch
Subject: [R] par(mfror=c(1,2))
Sensitivity: Personal

dear list,

i have a problem using the par function.

in one graphic device i want to have two plots so i tried to use par(mfror=c(1,2)).
of course it worked out, but the height now is twice the length of the width for each single plot.
what i actually wanted is something like par(mfrow=c(2,2)) where only the top (or bottom) two plots are drawn with entire length proportions of 1 to 2 ( height 1, width 2) i want to create a pdf figure and canīt figure out how that might work.
(e.g. the height should be 8 cm, the length 16 cm but each plot should have the proportion 1:1(height:width))

thanks for any help.

stefan

______________________________________________
R-help@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

______________________________________________
R-help@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
Received on Tue May 02 02:41:04 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 02 May 2006 - 04:10:01 EST.

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