1、ease way
ggplot(iris, aes(factor(Species), Sepal.Width, fill = Species))+ stat_boxplot(geom ='errorbar') + geom_boxplot()
Exploring ggplot2 boxplots – Defining limits and adjusting style | R-bloggers
r - How to add horizontal lines to ggplot2 boxplot? - Cross Validated (stackexchange.com)
网友评论