I've a problem concerning construction of log y-axis in a graphic. How can I manage that the units/numbers of my log y-axis aren't shown in 1e+03, 1e+04, 1e+05 etc...., but only in regluar arabic numbers (1000, 10000, 100000)? Thanks.
+5
A:
You need to remove the axis (by setting yaxt = "n"
) and then re-format it properly:
plot((1:100)^3, log = "y", yaxt = "n")
axis(2, format(c(1,10,100)^3, scientific=FALSE))
This was asked before on R-help.
Shane
2009-09-27 20:29:34
I suggest using axis(2, format(axTicks(2,log=TRUE), scientific=FALSE)) in the second line. Then it's less "human depend".
Marek
2009-09-28 08:40:53