[英]Marker edge colors or just other markers of matplotlib.axes.Axes.errorbar (Python Package) to every point
Is there any way to use color markers of matplotlib.axes.Axes.errorbar (Python Package), or just other markers, to every point? 有没有办法在每个点上使用matplotlib.axes.Axes.errorbar(Python包)的颜色标记,或者仅使用其他标记?
Example: 例:
err = np.array([0.0, math.log(0.0423746910453,10), math.log(0.26659516937,10)])
plt.errorbar(x,y,yerr=err,marker='^',markeredgecolor='gray')
I would like to have a color marker, or just other marker, to every point (error). 我想对每个点(错误)使用一个颜色标记或其他标记。
I'm not sure if there matplotlib supports this natively, however you can simply workaround this limitation: 我不确定是否有matplotlib本身支持此功能,但是您可以解决此限制:
First, draw the line connecting the points with plt.plot(x, y)
. 首先,绘制连接点与
plt.plot(x, y)
。 You can then draw each marker separately by calling plt.errorbar
for each point with different options. 然后,可以通过使用不同的选项为每个点调用
plt.errorbar
来分别绘制每个标记。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.