seaborn - 如何在 Python 中使用 Seaborn 在条形图中显示带有标准差的误差条

标签 seaborn

我注意到 sns.barplot 使用标准错误作为误差条默认 1 。有办法把它改成SD吗?

ax = sns.barplot(x="day", y="tip", data=tips, ci=???)

最佳答案

编辑 2017 年:

现在,Seaborn v0.8 中有一个选项可以显示多种绘图类型的标准差。在问题的特定情况下:

ax = sns.barplot(x="day", y="tip", data=tips, ci="sd")

<小时/>

答案是:直接做是不可能的。

<小时/>

我问过same question in the GitHub issue tracker for this library :

Could it be possible to represent standard deviation bars instead standard error bars in barplots?

I don't know if it is already possible tweaking ci and estimator. If this feature is not too complex to implement in Seaborn, I could help to develop it as much as I can.

这个库的开发者(mwaskom)回答:

No, it's not possible, sorry.

关于seaborn - 如何在 Python 中使用 Seaborn 在条形图中显示带有标准差的误差条,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36067194/

相关文章:

pandas - Sns barplot 不对切片值进行排序

python - 获取描述任意 matplotlib/seaborn 图的 numpy 数组

python - 填充 pandas 数据框中缺失的复合索引

boxplot - 当我的数据来自 python 字典时,如何将类别名称添加到我的 seaborn 箱线图中?

python - jupyter 笔记本 : show seaborn plot again

python - 当我在 pandas 绘图中使用样式时,为什么不应用 colomap?

python - 更改 Seaborn Boxplot 上的框和点分组色调

python - 只有一条彩色线的 Seaborn 多线图

python - 我可以将字典的值分成多列并且仍然能够绘制它们吗?

python - 将值映射到 seaborn 热图中的特定颜色