我有以下数据集:
我想使用构面并排创建三个条形图。我在R中有以下代码:
ggplot(nod.stat,aes(fill=Fix,x=Fix,y=mean)) +
geom_bar(stat='identity',position=position_dodge(width=0.9)) +
geom_errorbar(aes( ymin=mean-se,ymax=mean+se),position = position_dodge(width = 0.90),width=0.2) +
facet_wrap(.~variable,scales='free')
但这会不断添加来自相同Fix条件的所有三个SE,如下图所示: Figure: output bar plot
如何确保每个错误条仅对应一个错误条?