how to include in legend symbol of mean in boxplot with ggplot?
问题 I would like to have in the legend the symbol of the mean together with the symbols of the boxes. So my legend should include "Exposure 1, Exposure 2, Exposure 3" but also the word mean and its symbol. How to do this using ggplot in R? This is the code I'm using to produce the boxplot: library(ggplot2) mydata <- read.csv("~/mydata.csv") bp<-ggplot(mydata,aes(x=Category,y=MeanValues,,fill=as.factor(Category))) + geom_boxplot() bp+labs(x = NULL, y = "Result")+ theme_bw()+stat_summary(fun.y =