我想在seaborn中绘制一个factorplot但是手动提供误差条而不是让seaborn计算它们.
我有一个大致如下的pandas数据框:
model output feature mean std
0 first two a 9.00 2.00
1 first one b 0.00 0.00
2 first one c 0.00 0.00
3 first two d 0.60 0.05
...
77 third four a 0.30 0.02
78 third four b 0.30 0.02
79 third four c 0.10 0.01
我正在输出一个看起来大致如下的情节:
我正在使用这个seaborn命令来生成图:
g = sns.factorplot(data=pltdf, x='feature', y='mean', kind='bar',
col='output', col_wrap=2, sharey=False, hue='model')
g.set_xticklabels(rotation=90)
但是,我无法弄清楚如何让seaborn使用’std’列作为错误栏.不幸的是,重新计算相关数据帧的输出将非常耗时.
除了我无法弄清楚如何使用matplotlib.pyplot.bar函数.
有没有办法使用seaborn factorplot或FacetGrid结合matplotlib?
谢谢!