[R] Graphics - plotting two graphs

Scionforbai scionforbai at gmail.com
Wed Oct 24 18:21:38 CEST 2007


plot(x1,y1,"b",xlim=range(x1), ylim=c(0, 170),pch=16,cex=2,axes=FALSE,ann=FALSE)
par(col="grey50", fg="grey50", col.axis="grey50")
axis(1, at=seq(0, 16, 4))
axis(2, at=seq(0, 170, 10))
axis(4, at=seq(0, 170, 10))
par(new=TRUE)
plot(x2,y2,"b",xlim=range(x2), ylim=c(0, 170),pch=21,cex=2,axes=FALSE,ann=FALSE)
axis(3, at=seq(0, 70, 10))
box(bty="u")
mtext("k", side=1, line=2, cex=0.8)
mtext("GO terms", side=2, line=2, las=0, cex=0.8)
mtext("Num clusters", side=3, line=2, las=0, cex=0.8)
mtext("GO terms", side=4, line=2, las=0, cex=0.8)

But I don't see the point of double scale.



More information about the R-help mailing list