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

Petr Pikal petr.pikal at precheza.cz
Fri Apr 28 13:35:23 CEST 2006


Hi

This could be near to what you want. You need to play around with 
width and height to get the exact result you want.

> pdf("test.pdf", width=4, height=8)
> par(mfrow=c(2,1))
> plot(1:10,1:10)
> plot(10:1,1:10)
> dev.off()

HTH
Petr


On 28 Apr 2006 at 10:07, Stefan Semmeling wrote:

From:           	"Stefan Semmeling" <trittihn at web.de>
To:             	<r-help at stat.math.ethz.ch>
Date sent:      	Fri, 28 Apr 2006 10:07:53 +0200
Subject:        	[R] par(mfror=c(1,2))

> 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 at 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

Petr Pikal
petr.pikal at precheza.cz




More information about the R-help mailing list