I need to draw the error bars on a curve. in the images I have seen that this process is done, the bar lengths change from point to point.
but when I do for my curve I get something like :
I am doing the calcualtions by Python. and use this code
what Python asks me to calculate standard deviation is a list that contain all of the values of one of the axes on a 2D curve I have :
then if I use this value :
line_Mag=ax.errorbar(xerr, Magerr, yerr=STDV_Mag, **lineStyle_Mag, color=color_Mag, label=filename + ShN)
I will have a plot with error bars all the same. Where am I going wrong ?
Edit 2 : to provide some data to explain what I need :
let's imagine the horizontal axis has these points :
t= [10 , 20 , 30 ,40 , 50 , 60 ,70 +
and I have 4 curves that their vertical axis values at the points above are :
c1= [18 , 15 , 14 , 10 , 11 , 12 , 25]
c2= [19.5 , 16.9 , 15.5 , 11.2 , 12.5 , 13.8 , 11]
c3= [19 , 17.1 , 16.1 , 12.3 , 13.6 , 11 , 27.5]
c4= [22 , 18.9 , 17.7 , 13.9 , 11.7 , 12 , 22]
so to draw the graph in blue above , I should first find a curve c5 that its values are the point to point average of all of the 4 curves. then calculate the standard deviation (sd) of the whole curve which is one number.
the other way is that after finding the curve c5, I calculate the sd of each group of 4 points and report them on the curve, so I will have something like curve in red.
What I need to know is the conceptual difference and statistical correctness of these , and their meaning.