I'd like to add % labels to my stacked bar chart. Here is my data.
discipline <- c("Physician", "Social Worker", "NP/PA", "Case Manager", "Nurse", "Pharmacist", "Administrative"))
variable <- c("aware", "confident", "issue", "scope", "concerned", "access"))
response <- c("N/A", "Strongly Agree", "Agree", "Neutral", "Disagree", "Strongly Disagree")
Data <- data.frame(discipline, variable, response)
Here is my code, without labels.
ggplot(incorporation)+
geom_bar(aes(fill = response, x = (..count..)/sum(..count..),
y = factor(reorder(variable,desc(response))),),
position = "fill")+
theme(axis.text.x = element_text(angle = -90, hjust = 0),
axis.title.y = element_blank(),
axis.title.x = element_blank())+
scale_fill_brewer(palette = "RdYlGn", direction = -1)+
scale_x_continuous(labels = scales::percent)