[R] Setting where the x-axis crosses the y-axis

Richard M. Heiberger rmh at temple.edu
Sat Apr 7 05:50:40 CEST 2007

I think you are looking for this

tmp <- abs(rnorm(100, s=8))
ltmp <- log(tmp)
plot(ltmp, type="h", yaxt="n", main="what you want")
logticks <- axTicks(2, axp=c(10^c(-1,3),3), log=TRUE)
axis(2, at=log(logticks), labels=logticks)
plot(tmp, type="h", log="y", main="standard")

More information about the R-help mailing list