When I plot a bar graph in ggplot2 I would like to reduce the space between the bottom of the bars and the x-axis to 0, yet keep the space above the bars and the plot box.
You can expand the limits manually, e.g. with expand_limits(y=10.1), or use this trick to add an invisible layer with scaled up data,
expand_limits(y=10.1)
ggplot(mtcars, aes(x=as.factor(carb))) + geom_bar() + scale_y_continuous(expand = c(0,0)) + geom_blank(aes(y=1.1*..count..), stat="bin")