在ggplot Python中添加错误栏 [英] Adding errorbars in ggplot Python

查看:99
本文介绍了在ggplot Python中添加错误栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

找不到将错误栏添加到Python ggplot图的方法. 以下问题已被忽略了一年以上. 文档中没有任何内容.

Can't find a way of adding errorbars to a Python ggplot plot. The following issue has been neglected for over a year. Nothing in the docs.

推荐答案

我遇到了同样的问题,但没有找到解决方案.但是我确实找到了解决方法.您可以使用ggplot样式的matplotlib.从那里开始,使用误差线要容易得多.我已经附上了一些我使用过的代码的示例.

I had this same problem and found no solution. However I did find a way around it. You can use matplotlib in the style of ggplot. From there it's much easier to use error bars. I've attached an example of some code I used.

plt.style.use('ggplot')

这是我的一个代码的摘录

This is an extract of one of my codes

df2.gLongCrFiltered['mean'].plot(kind='bar', yerr=df2.gLongCrFiltered['std'])

返回了此内容的

这篇关于在ggplot Python中添加错误栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆