Lerr = np.array([1.5,1.3,1.4])

These are the error values of the three data points in your measurement of L.

plt.errorbar(T, L, fmt='ro', label="data",
             xerr=0.001, yerr=Lerr, ecolor='black')

The inputs of errorbar are:
  • x-axis array
  • y-axis array
  • marker style and color.
  • data label . This is useful if you are using legends.
  • the error in the x-axis. Note here that all the x-axis data points have the same error value. In this case you did not need to define an array.
  • the error in y. Note here that since each point in your plot had a different value for error we needed to input an array.
  • the color of the error bars

    Note: You need to follow this exact order when you fill in the function errorbar