I am trying to get the label in the center of each bar in the following barplot.Please see attached image.
Here is the code I am using for this purpose,
p <- ggplot(top4_rev_comparison, aes(x=CARD_ORDINAL_NBR, y=TOTAL_DEMAND)) + geom_bar(stat='identity',aes(fill=COHORT_NM),position=position_dodge())+ scale_y_continuous( labels = scales::comma)+ labs(title="Total Revenue Earned For Doors 1 thru 4 Across Test \n and Control",caption="Data between Nov. 14, 2019 and Nov. 17, 2019",x="Door Number", y="Total Revenue")+ geom_text(aes(label = round(TOTAL_DEMAND)), position = position_dodge(0.9))+ coord_flip() p
Can I kindly get some help on how to align my text properly? Help is appreciated.