r - How to display total count in geom_text -
i have been trying produce count of booking made , no booking made. below code have used. giving me full count (sum) across days. how can amend code give me count across stacked graph is. want count of booking made , count of non booking made.
p <- ggplot(swiss,aes(x=as.factor(no.of.days.request.took))) p + geom_bar(aes(fill=as.factor(booking_new))) + geom_text(aes(label=..count..), vjust=1,stat='count', position = "stack")
Comments
Post a Comment