[R] controlling figure dimension/location

Bill Simpson W.Simpson at gcal.ac.uk
Wed Mar 13 15:46:10 CET 2002


Thanks very much Achim for the tip.

This is what I wound up with:

par(mar = c(0, 5.1, 1, 2.1), oma = c(6, 0, 5, 0), mfrow=c(2,1))
par(pty="s")
x<-rnorm(100)
y<-rnorm(100)
xticks<-pretty(x)
yticks<-pretty(y)
plot(x, y,axes=FALSE,xlim=range(xticks), ylim=range(yticks))
axis(side=1, at=xticks,labels=FALSE)
axis(side=2, at=yticks)
box()

x1<-rnorm(100)
y1<-rnorm(100)
plot(x1,y1,axes=FALSE,xlim=range(xticks), ylim=range(yticks))
axis(side=1, at=xticks)
axis(side=2, at=yticks)
mtext("x",side=1,line=2)
box()


A lot of extra code was required because the only way I could see to get
rid of tick labels is to turn of axes then add manually

Bill

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