Setting y axis breaks in ggplot

You need to add

+ scale_y_continuous(breaks = seq(0, 100, by = 20))

EDIT: Per comment below, this only works if axis already in the appropriate range. To enforce the range you can extend above code as follows:

+ scale_y_continuous(limits = c(0, 100), breaks = seq(0, 100, by = 20))

Leave a Comment