我从我的数据中创建了多个条形图,使用stat_summary
. 但是,我想手动指定误差线的限制(而不是使用mean_cl_boot
)。对于使用图表绘制的数据,如何做到这一点facet_grid
?
我用来创建图表的代码如下:
graph <- ggplot(slantclean, aes(x = View,value, fill = Texture))
graph + stat_summary(fun.y = mean, geom = "bar", position = "dodge") +
stat_summary(fun.data = mean_cl_boot, geom = "pointrange",
position = position_dodge(width = 0.90)) +
labs(x = "View", y = "Vertical height of ellipse (cm)", fill = "Texture") +
facet_grid( Shape ~ TNOGroup)