python 3.x - plt.errorbar issue: FutureWarning: elementwise comparison failed; returning scalar instead -
when execute code 1 below, plt.errorbar, following warning message:
futurewarning: elementwise comparison failed; returning scalar instead, in future perform elementwise comparison if self._edgecolors == str('face'):
import numpy np import matplotlib.pyplot plt x = np.array([1,2,3,4,5,6,7,8,9,10]) y = np.array([2,3,5,6,5,4,6,7,2,1]) yerreur = np.array([2,4,5,1,1,3,4,5,2,1]) plt.figure(1) plt.errorbar(x,y,yerr = yerreur,fmt = 'none',ecolor = 'k') plt.savefig('test.pdf') plt.show()
how can fix issue? affect graph in way?
this issue taken care of in version 1.5.x:
it should 1.5 branched master after merged , on 1.5.x branch
make sure _edgecolors string before comparison string
try updating matplotlib latest version.
Comments
Post a Comment