使用facet_wrap时,不会有条件地分隔相同变量的错误栏

我有以下数据集:

Figure: dataset

我想使用构面并排创建三个条形图。我在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

如何确保每个错误条仅对应一个错误条?

pk110987 回答:使用facet_wrap时,不会有条件地分隔相同变量的错误栏

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3106019.html

大家都在问