[R] controlling figure dimension/location

Michael D. Sohn mdsohn at lbl.gov
Wed Mar 13 08:48:24 CET 2002


I'm making two plots, one on top of the other.  On the upper plot, I do
not print the x-label or the x-tick-label.  To reduce space, I'd like to
keep the white space between the two figures at a minimum.  However, I
can't figure out how to methodically reduce the space while maintaining
the same figure dimensions for both plots.  I could add margin space
below the lower plot and reduce space above the lower plot but that
leaves a bunch of whitespace at the bottom of the figure.  What command
am I missing?
thanks,
Mike

Example commands:
mypar <- par(no.readonly=T)
par(mfcol=c(2,1))
par(mar=c(5,4,1,1))
plot(rnorm(100), ylim=c(-3,3), xlab="", axes=F)
axis(1, at=seq(0,100,20), labels=c("","","","","",""))
axis(2, at=seq(-3,3,1))
box()
plot(rnorm(100), ylim=c(-3,3), axes=F)
axis(1, at=seq(0,100,20))
axis(2, at=seq(-3,3,1))
box()
par(mypar)


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