Why is matplotlib is showing two error bars? I think it may have something to do with the asymmetric error bars.
You can reproduce the problem with this:
>>> import matplotlib.pyplot as plt
>>> plt.errorbar([1,2,3],[3,4,2],yerr=[[1,2,0.5]]*2, label='data')
<Container object of 3 artists>
>>> plt.legend()
<matplotlib.legend.Legend object at 0x10b82f590>
>>> plt.show()
you can set the number of points in legend:
plt.legend(numpoints=1)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With