Skip to content
Prev 10800 / 398502 Next

controlling plot spacing?

Hi

I think you want par(mgp).  For example, try ...

par(mfrow=c(2,2), mar=rep(6,4), mgp=c(3, 1, 0))
plot(1:10, xlab="default position", ylab="default position")
box("figure", lty="dashed")
par(mgp=c(4, 1, 0))
plot(1:10, xlab="axis label further out", ylab="axis label further out")
box("figure", lty="dashed")
par(mgp=c(4, 2, 0))
plot(1:10, xlab="tick labels further out too", ylab="tick labels further out
too")
box("figure", lty="dashed")
par(mgp=c(1.5, .6, 0))
plot(1:10, xlab="both labels closer in", ylab="both labels closer in")
box("figure", lty="dashed")

For finer control, you will probably need to use mtext() to draw the labels
yourself.

Hope that helps.

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