0

I have this code:

performance %>%
    ggplot(aes(Sexo, fill = factor(PLM.year1))) +
    geom_bar(position = "fill")

and its giving me some weird colours.. I want them in grey.. how can I change it, please?

duckmayr
  • 16,303
  • 3
  • 35
  • 53
Maria
  • 11
  • 4
  • You haven't done anything to assign the color scale you want. See the docs for any of the [`scale_fill_*`](https://ggplot2.tidyverse.org/reference/scale_discrete.html) functions – camille Oct 05 '19 at 21:43
  • Possible duplicate of [changing ggplot factor colors?](https://stackoverflow.com/questions/15130497/changing-ggplot-factor-colors) – camille Oct 05 '19 at 21:46

1 Answers1

1

Try adding

+ scale_fill_grey(start=0.8, end=0.2)

based on the ggplot2 documentation

van
  • 550
  • 4
  • 15