RecipePythonBeginner Fit a curve to data with error bars and draw a confidence band band = np.sqrt(np.einsum("ij,jk,ik->i", J, pcov, J)) # 1-sigma uncertainty of the curve