Why am I getting this ymax
error when doing the following graph in ggplot2? I am trying to create a histogram with some data labels.
require(ggplot2)
df=data.frame(ToothGrowth)
ggplot(df,aes(x= len)) +
stat_bin(geom="bar", binwidth=5, aes(fill=..count..), colour="black") +
stat_bin(binwidth=5, geom="text", aes(label=..count..), vjust=-1.5) +
facet_grid(.~supp)+
ylim(c(0,15))+
theme_bw()
Can someone explain to me what the ymax
parameter is too?