如何在条形图 PowerBI 上获取误差线?

发布于 2025-01-20 16:41:11 字数 430 浏览 0 评论 0原文

我想要这样的条形图:

所需条形图

每列上的误差条应显示分散度(我已在其中一列中计算它)。顶线显示是否存在显着差异。现在我只实现了这样的图:

实现的条形图

我在 PowerBI Desktop 中使用简单的集群条形图。也许有另一种视觉效果或另一个程序可以做到这一点?也许 Python 不知何故?

I want to have such barchart:

Desired bar chart

The error bar on each column should show dispersion (I have it calculated in one of the columns). And top lines show whether there is a significant difference. Right now I have only achieved such graph:

achieved bar chart

I am using simple clustered barchart in PowerBI Desktop. Maybe there is another visual for that or another program which could do it? Maybe Python somehow?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

玉环 2025-01-27 16:41:12

提到的在这里您可以使用Python中的matplotlib来做到这一点。例如:

import numpy as np
import pylab as plt

data       = np.array(np.random.rand(1000))
y,binEdges = np.histogram(data,bins=10)
bincenters = 0.5*(binEdges[1:]+binEdges[:-1])
menStd     = np.sqrt(y)
width      = 0.05
plt.bar(bincenters, y, width=width, color='r', yerr=menStd)
plt.show()

A mentioned here you can do that with matplotlib from python. Just as an example:

import numpy as np
import pylab as plt

data       = np.array(np.random.rand(1000))
y,binEdges = np.histogram(data,bins=10)
bincenters = 0.5*(binEdges[1:]+binEdges[:-1])
menStd     = np.sqrt(y)
width      = 0.05
plt.bar(bincenters, y, width=width, color='r', yerr=menStd)
plt.show()
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文