Try this:
library(ggplot2)
library(dplyr)
#Code
df %>%
mutate(percent=as.numeric(gsub('%','',percent))/100,
services=factor(services,levels = rev(unique(services)),ordered = T))%>%
ggplot(aes(fill=services, y=percent, x=services)) +
geom_bar(position="dodge", stat="identity") +
scale_y_continuous(labels = scales::percent,limits = c(0,1))+
coord_flip()+
theme(legend.position = 'none')
Output:
Some data used:
#Data
df <- structure(list(services = c("overall", "service 1", "service 2",
"service 3", "service 4", "service 5", "service 6", "service 7",
"service 8", "service 9", "service 10"), percent = c("80.00%",
"50.00%", "43.00%", "45.00%", "78.00%", "34.00%", "78.00%", "23.00%",
"54.00%", "32.00%", "32.00%")), row.names = c(NA, -11L), class = "data.frame")
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…