I am trying to draw shortcuts that look informative, clear and neat.
I gave an example and raised another question about label and axis formatting.
For example, I have sales data that includes the brand, categories and expenses in euros. When the sum of EUR large (millions or more) of labels looks very difficult to read, not informative.
As a result, the x-axis is in Scientific notation , and also looks really unclean.
I managed to format the labels in my own way: it shows Euros in thousands. geom_text(aes(label= paste(round(EUR/1000,0),"€"), y=pos), colour="white") Is there a simpler or automatic way?
Since Scientific notation looks really obscure, for the axis, I tried to use scale_y_continuous(formatter = "dollar") , but this does not seem to work. Moreover, I could not find if Eur implemented instead of the dollar. I believe it would be better to show y-axis in thousands . Any solutions?
In addition, I am enclosing a reproducible example:
library(plyr) library(dplyr) library(ggplot2) library(scales) set.seed(1992) n=68 Category <- sample(c("Black", "Red", "Blue", "Cyna", "Purple"), n, replace = TRUE, prob = NULL) Brand <- sample("Brand", n, replace = TRUE, prob = NULL) Brand <- paste0(Brand, sample(1:5, n, replace = TRUE, prob = NULL)) EUR <- abs(rnorm(n))*100000 df <- data.frame(Category, Brand, EUR) df.summary = df %>% group_by(Brand, Category) %>% summarise(EUR = sum(EUR)) %>%
