The key is to not change the margins, set them once and stick with those
margins. The next question then becomes "how do I leave area at the
top/bottom for the title and common axis?" to which the answer is "Set
outer margins at the beginning".
Modifying your code:
y<-rnorm(1:100)
x<-rnorm(1:100
Texas A&M University
College Station, TX 77843-4352
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> project.org] On Behalf Of Richard M. Heiberger
> Sent: Monday, November 19, 2012 2:26 PM
> To: Richard James
> Cc: r-help@r-project
I think this task would be easier in lattice
library(lattice)
xyplot(y + y + y + y + y + y ~ x, outer=TRUE, layout=c(1,6),
strip=FALSE, strip.left=TRUE,
ylab="6 copies of the Y variable",
main="put an interesting title here")
Six different y variables instead of six
Dear colleagues,
I wish to create a figure with 6 plots arranged vertically with no spacing
between them as they all have a common x-axis.
However, using the code below I'm unable to get the plot area the same size
for each plot.
The bottom plot with the x-axis label is smaller than the others
4 matches
Mail list logo