Consider the data:
foo <- data.frame("Factor" = rep(c("A", "B", "C"), 50),
"Value" = rbinom(150, 1, .5))
ggplot(foo, aes(Factor, Value))+
geom_bar(stat = "summary", fun.y = mean, position = "dodge")
That creates (approximately) this plot:
I'm trying to limit the y-axis of the plot to a bound that is lower than the natural data (i.e., 0 - .75), but doesn't obscure any aggregated value actually shown in the outputted plot. When doing so with scale_y_continuous(limits = c(0, .99))
, the bars dissapear. Trying to figure out how to limit the y-axis without this happening. Your help is much appreciated!