r - Change the thousands separator in a ggplot -


When plotting a plot with ggplot, I'm having trouble getting the preferred thousandth separator. I want to separate thousands by a dot rather than a comma. This way it does not give a separator:

  is required (ggplot2) required (scale) option (scipen = 10) D = data.frame (x = c ( 1,2), y = c (1000001500000) p = ggplot (d, aes (x, y)) + gom_bar (state = "identity") p   

and thus This gives a comma:

  p + scale_y_continuous (labels = comma)   

How do you get the dot in the form of thousands separators? I have not been able to find documents about some documents, which have other types of labels.

Thank you in advance,

Forza

  P + scale_y_continuous (labels = function (x) format (x, big.mark = ".", Scientific = FALSE))    

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -