[R] layout question

Emmanuel Paradis paradis at isem.univ-montp2.fr
Mon Sep 18 16:40:44 CEST 2000


At 12:55 18/09/00 +0100, you wrote:
>I wanted to produce a layout like this:
>
>      |----------|
>      |          |
>      |    1     | 
>      |          |
>|-----------------------|
>|           |           |  
>|     2     |    3      |   
>|           |           |  
>|-----------------------|
>Three equal sized plots with the top one centred about the other two.
>
>So far I am using
>nf<-layout(matrix(c(1,1,2,3), 2, 2, byrow=TRUE),respect=TRUE)
>which produces a layout like this:
>
>|-----------------------|
>|                       |
>|          1            |
>|                       |
>|-----------------------|
>|           |           |
>|     2     |    3      |
>|           |           |
>|-----------------------|
>
>The top plot is stretched horizontally.
>
>Is there a way to get what I want with layout or by some other means?
>Thanks for any help.
>
>Bill
>

Hi,

You can play with the mar graphical parameter. For instance,

 layout(matrix(c(1,1,2,3), 2, 2, byrow=TRUE),respect=TRUE)
 par(mar=c(5.1, 12.1, 1.4, 10.1))
 plot(rnorm(10))
 par(mar=c(5.1, 4.1, 1.4, 2.1))
 plot(rnorm(10))
 plot(rnorm(10))

makes three plots roughly similar in size.

Emmanuel Paradis
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list