x <- 10^runif(200, -1, 2)
plot(x, 1:200, xaxt="n", log="x")
logAxis(base=1)
# overplot vertical lines:
logAxis(expr=points(x, 1:200), base=c(1,2,5), col=2 )
# plots where log="x" is not possible:
hist(log10(x), breaks=20, col.axis="grey", main="")
logAxis(side=3, expr=hist(log10(x),breaks=20,add=TRUE, col=3))
Run the code above in your browser using DataLab