2020-10-28

How to add percentage into the stacked bar plot in ggplot2?

My Code:

ggplot(data = telcom_data)+ geom_bar(mapping=aes(x=State, fill=Resolve_status))+ xlab("State") + ylab("Count of complaints")+ labs(title="Bar Chart for no of compaint State Wise")+ theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1))

The plot I currently I get

I need to add a percentage to each state as it's label(Percentage between open vs closed). How could I do it?

My Dataset looks like

Sample Dataset

Thanks in Advance!!



from Recent Questions - Stack Overflow https://ift.tt/37U2JFE
https://ift.tt/eA8V8J

No comments:

Post a Comment