[R] ggplot2 axis label German formatting

Stageexp ronjaq at gmx.net
Sun Jan 12 12:02:10 CET 2014

Hi all I have a problem with formatting my ggplot2 graph.

Let's look at this example:
x <- rnorm(100, mean=100, sd = 1) * 1000000
y <- rnorm(100, mean=100, sd = 1) * 1000000
df <- data.frame(x,y)

p.new <- ggplot(df,aes(x,y)) +

This is showing the axis labels in scientific notation. Adding

p.new + scale_x_continuous(labels = comma)

will show the numbers correctly, BUT: In Germany, we use decimal points and
commas exactly the other way around, for example, we write 5,3% and 100.000.

I only found the options "comma", "dollar" and "percent" for labels. Is
there any way in which I can show the numbers separated by decimal points?

Kind Regards

View this message in context: http://r.789695.n4.nabble.com/ggplot2-axis-label-German-formatting-tp4683477.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list