rg
> Subject: Re: [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-n
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.
___
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.nab
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
4 matches
Mail list logo