Hi:

Borrowing an idea from a post by Baptiste Auguie a few weeks ago on the
ggplot2 list, try this:
http://groups.google.com/group/ggplot2/browse_thread/thread/46a78ab3315fdb7/f2ad305ae935a862?lnk=gst&q=formatter#f2ad305ae935a862

mysep <- function(x, ...)
   format(x, big.mark = ' ', trim = TRUE, scientific = FALSE, ...)

x <- rnorm(10) * 100000
y <- seq(0, 1, length = 10)
p <- qplot(x, y)
p + scale_x_continuous(formatter = mysep)

HTH,
Dennis

On Tue, Nov 23, 2010 at 4:13 AM, Jack Johnson <jackjohnson10...@gmail.com>wrote:

> Hi,
>
> I'd like to change scientific number formatting, 1,E+06,  in y-axis values
> to 1 000 000 (number with 1000 separator). How to do this in ggplot..? I
> tried to use scale_discrete but couldn't get it to work. Below is a code I
> have this far:
>
> p<-ggplot(Data,aes(x=Date,y=PRINCIPAL))
> p+geom_point()
>
> Thanks for any help!
>
> -Jack
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to