Skip to content

Format y axis

2 messages · Pedro páramo, Jim Lemon

#
Hi all,

I have been looking on documentation but I?m not able to find how to
customize format on y axis so that for example:

y value goes from 1000 to 9000 it appears on thousand position a 1,000 and
on the comas with "," and two decimals.

(For the previous answers many thanks)
#
Hi Pedro,
Try this:

par(mar=c(5,5,4,2))
plot(seq(0,9000,1000),yaxt="n",ylab="")
axis(2,seq(1000,9000,1000),
 labels=formatC(seq(1000,9000,1000),format="f",
 big.mark=",",digits=2),las=2)

Jim
On Sun, Jun 4, 2017 at 7:11 PM, Pedro p?ramo <percentil101 at gmail.com> wrote: