[R] ggplot2 axis label German formatting

2014-01-12 Thread Stageexp
Hi all I have a problem with formatting my ggplot2 graph. Let's look at this example: library(ggplot2) library(scales) x - rnorm(100, mean=100, sd = 1) * 100 y - rnorm(100, mean=100, sd = 1) * 100 df - data.frame(x,y) p.new - ggplot(df,aes(x,y)) + geom_point() print(p.new) This is

Re: [R] ggplot2 axis label German formatting

2014-01-12 Thread Ista Zahn
Hi, You can write a function to format the labels, like this: gcomma - function(x) format(x, ..., big.mark = ., decimal.mark = ,, scientific = FALSE) p.new + scale_x_continuous(labels = gcomma) Best, Ista On Sun, Jan 12, 2014 at 6:02 AM, Stageexp ron...@gmx.net wrote: Hi all I have a problem

Re: [R] ggplot2 axis label German formatting

2014-01-12 Thread Stageexp
Works like a charm! Thank you so much! One more comment: I either had to add a second input parameter ... to gcomma or remove the ... from the code, otherwise I got an error. -- View this message in context: