【发布时间】:2020-08-31 02:23:49
【问题描述】:
我正在尝试以一种很好的方式显示我的数据,例如在 seaborn 文档中看到的:
我不太确定如何进行。我设法获得了点的值及其各自的标准差,但它看起来很分散,而我只想显示一个趋势:
我研究了 here 和 there 尝试应用建议的解决方案,但我无法使其发挥作用。
这是我玩的:
Final_array = Mean Std
0 0.739269 0.157892
1 0.807382 0.160464
2 0.800024 0.137239
3 0.825854 0.132472
4 0.864854 0.070544
.. ... ...
95 0.797202 0.101961
96 0.747578 0.143394
97 0.751472 0.158651
98 0.587009 0.198987
99 0.728447 0.104601
sns.set(style="darkgrid", palette="muted", color_codes=True)
fig, ax = plt.subplots(figsize=(7,5))
y_pos = np.arange(Final_array.shape[0])
ax.errorbar(y_pos, Final_array[:,0], yerr=Final_array[:,1], elinewidth=0.5)
plt.show()
有人有想法吗?我是使用情节的初学者。可以平滑吗?并获得像 seaborn 图像中的漂亮叠加层而不是误差线?
这些可能是愚蠢的问题。
亲切的问候,
【问题讨论】:
-
为什么样条解决方案不适合您?
-
由于我的数据没有排序,我无法使用样条进行平滑处理。
标签: python matplotlib seaborn smoothing