如何使用Matplotlib强制错误栏渲染最后

如何使用Matplotlib强制错误栏渲染最后,第1张

如何使用Matplotlib强制错误栏渲染最后

看来这是一个错误,

matplotlib
其中的
zorder
参数
errorbar
未正确传递到误差线的垂直线部分。

复制您的问题:

import matplotlib.pyplot as pltfig = plt.figure()ax = plt.gca()[ax.plot(rand(50),color='0.75') for j in range(122)];ax.errorbar(range(50),rand(50),yerr=.3*rand(50))plt.draw()

!错误栏失败 Hacky解决方法:

fig = plt.figure()ax = plt.gca()[ax.plot(rand(50),color='0.75',zorder=-32) for j in range(122)];ax.errorbar(range(50),rand(50),yerr=.3*rand(50))plt.draw()

作为问题报告给matploblib
https://github.com/matplotlib/matplotlib/issues/1622(现已打补丁并关闭)



欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/zaji/5642831.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-12-16
下一篇2022-12-16

发表评论

登录后才能评论

评论列表(0条)

    保存