My data range always seems to be greater than the top label in the y-axis. Is there a way I can automatically include it without manually setting limits?
e.g. in
Have you tried skipping the 0.95 * 1.05 multipliers?
expand_limits(y=c(min(pretty(c(dat$y,min(dat$y)))),max(pretty(c(dat$y,max(dat$y))))))