European/french thousand separator in ggplot
ggplot2, r
Solution
As @David and @joran just said.
First, define the label formatter:
space <- function(x, ...) {
format(x, ..., big.mark = " ", scientific = FALSE, trim = TRUE)
}
and then use it with `scale_y_continous`:
plot + scale_y_continuous(labels = space)
Problem
I'm trying to format the y axis in a ggplot graph with a space (and not a comma) as thousand separator `;` something like 10 000 and not 10,000. I can't found it in the `scale_y_continuous` help. Thanks for any hint.