R-beta: multiplot using fig

Bill Simpson (wsimpson@uwinnipeg.ca)
Thu, 26 Mar 1998 10:19:23 -0600 (CST)

Date: Thu, 26 Mar 1998 10:19:23 -0600 (CST)
From: Bill Simpson <wsimpson@uwinnipeg.ca>
To: r-help <r-help@stat.math.ethz.ch>
Subject: R-beta: multiplot using fig

I followed Bill Venables's suggestion and tried to make a multiplot figure
with fig (using R .62).

> x<-rnorm(100)
> y<-rnorm(100)
> x11()      
> par(fig=c(0,2/3,0,1))
> plot(x,y)
> par(fig=c(2/3,1,0,1))
> qqnorm(x)
> postscript(file="twoplot.ps")           
> par(fig=c(0,2/3,0,1))
> plot(x,y)
>  par(fig=c(2/3,1,0,1))
> qqnorm(x)

However using both the X11 and postscript devices, it doesn't work.
In X11(), the plot first appears on the left, then disappears after the
call to qqnorm.  In postscript device, the two plots are on separate

Often I need to make multifigures where e.g. the two stacked on top of
each other have the same x variable and have the same axes to facilitate
comparison. I am finding it a problem to get rid of the numerical labels
and the text label at the bottom of the top plot (which are unnecessary
and bad form) and without a large empty gap between the two plots. This is
an S problem.  If I reduce the bottom margin around the indiv plots I get
the bottom label on the bottom plot clipped.  If I just reduce the bottom
margin on the top plot, the aspect ratio of the top plot differs from the
bottom.  I think what is needed is an ability to have overlapping plot
regions instead of tiled.  That way I can overlap the top of the bottom
plot over the empty region at the bottom of the top plot.

There is probably a way to do what I want, but I haven't figured it out
yet!  Thanks for any help.

Bill Simpson

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@stat.math.ethz.ch