How to display only integer values on an axis using ggplot2

If you have the scales package, you can use pretty_breaks() without having to manually specify the breaks.

q + geom_bar(position='dodge', colour="black") + 
scale_y_continuous(breaks= pretty_breaks())

Leave a Comment