Bar Chart in ggplo2, geom_bar ()

2

I made this chart with geom_bar() , I would like the bars to stick to the bottom line, indicated by the arrows. How could I do it?

Is there any parameter of the theme() function that can solve this problem?

    
asked by anonymous 17.09.2018 / 20:59

1 answer

2

Just add scale_y_continuous(expand = c(0,0)) to the chart. Example:

library(ggplot2)
ggplot(iris, aes(x = Species)) + geom_bar() + 
  scale_y_continuous(expand = c(0,0))

    
18.09.2018 / 00:27