0
library(ggplot2)
library(Hmisc)
data(mtcars)
myplot <- ggplot(mtcars, aes(x = as.factor(cyl), y = qsec)) +
geom_boxplot() +
stat_summary(fun.y = mean, geom = "point", shape = 5, size = 2) +
stat_summary(fun.data = mean_cl_normal, geom = "errorbar",
width = 0.2)
我想躲闪的均值和误差条有点权,使得误差线不掩盖IQR线的boxplot。指定position=position_dodge(.5)
似乎不起作用,因为geom_errorbar
不知道geom_boxplot
。
这是一个整洁的想法,并解决了我的问题。谢谢! – coanil 2014-10-09 14:54:28