0

I have a bar graph with color filled plotting like this,

ggplot(mtcars) + aes(x=factor(cyl), fill=factor(vs))+geom_bar()

enter image description here

How to transform each column to percentage? something like the following?

Any hint is appreciated. Thank you!

enter image description here

user2165
  • 1,951
  • 3
  • 20
  • 39

0 Answers0