I am trying to plot errorbar with the array of mean values and standard deviation by python as below:
p11 = np.genfromtxt(filn1,delimiter="",usecols=0,dtype=None)
p12 = np.genfromtxt(filn3,delimiter="",usecols=0,dtype=None)
s11 = np.genfromtxt(filn2,delimiter="",usecols=0,dtype=None)
s12 = np.genfromtxt(filn4,delimiter="",usecols=0,dtype=None)
F1= np.genfromtxt(filn6,delimiter="",usecols=0,dtype=None)
F2= np.genfromtxt(filn7,delimiter="",usecols=0,dtype=None)
yerr1 =0.5*s11
yerr2 = 0.5*s12
plt.errorbar(F1,p11,'r',yerr=yerr1,lw=3,label='Summer')
plt.errorbar(F2,p12,'b',yerr=yerr2,lw=3,label='Winter')
Here p11 and p12 are mean value arrays and s11 and s12 are corresponding standard deviation arrays. This code has worked well, but now it resulted:
TypeError: errorbar() got multiple values for keyword argument 'yerr'
Any idea or hints would be really appreciated. Isaac
r
andb
values for? – Casement