Dimitri Shvorob
2010-Feb-02 10:01 UTC
[R] Suppressing scientific notation on plot axis tick labels
Is there a better alternative to x = c(1e7, 2e7) x.lb = c(0,1e7,2e7) s.lb = format(x.lb, scientific = FALSE, big.mark = ",") barplot(x, yaxt = "n", ylab = "") axis(side = 2, at = x.lb, labels = s.lb) (I am sure there is a better alternative to line 2 :)). Thank you. -- View this message in context: http://n4.nabble.com/Suppressing-scientific-notation-on-plot-axis-tick-labels-tp1459697p1459697.html Sent from the R help mailing list archive at Nabble.com.
Dimitri Shvorob
2010-Feb-02 11:20 UTC
[R] Suppressing scientific notation on plot axis tick labels
Ruben Roa has kindly suggested using 'scipen' option - cf.> fixed notation will be preferred unless it is more than ?scipen? digits > wider.However, options(scipen = 50) x = c(1e7, 2e7) barplot(x) still does not produce the desired result. -- View this message in context: http://n4.nabble.com/Suppressing-scientific-notation-on-plot-axis-tick-labels-tp1459697p1459789.html Sent from the R help mailing list archive at Nabble.com.
Dimitri Shvorob
2010-Feb-02 11:58 UTC
[R] Suppressing scientific notation on plot axis tick labels
options(scipen = 50, digits = 5) x = c(1e7, 2e7) barplot(x) Still scientific... -- View this message in context: http://n4.nabble.com/Suppressing-scientific-notation-on-plot-axis-tick-labels-tp1459697p1459828.html Sent from the R help mailing list archive at Nabble.com.