繁体   English   中英

每个点的标记边缘颜色或matplotlib.axes.Axes.errorbar(Python包)的其他标记

[英]Marker edge colors or just other markers of matplotlib.axes.Axes.errorbar (Python Package) to every point

有没有办法在每个点上使用matplotlib.axes.Axes.errorbar(Python包)的颜色标记,或者仅使用其他标记?

例:

err = np.array([0.0, math.log(0.0423746910453,10), math.log(0.26659516937,10)])

plt.errorbar(x,y,yerr=err,marker='^',markeredgecolor='gray')

我想对每个点(错误)使用一个颜色标记或其他标记。

  • 点1:0.0-> markeredgecolor ='red'或marker ='^'
  • 点2:math.log(0.0423746910453,10)-> markeredgecolor ='blue'或marker ='X'
  • 第三点:math.log(0.26659516937,10)-> markeredgecolor ='green'或marker ='o'

我不确定是否有matplotlib本身支持此功能,但是您可以解决此限制:

首先,绘制连接点与plt.plot(x, y) 然后,可以通过使用不同的选项为每个点调用plt.errorbar来分别绘制每个标记。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM