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") 

enter image description here


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -