Error bars in matplotlib display over other curves
问题 I have a plot in which some data is represented by a scatter plot with error bars and I want to fit a curve to it. However, no matter where in the code I plot the curve, the error bars float on top of it. I want the fitted curves to display in front of the error bars because otherwise I can't see it. Here is a simple example of the issue: import numpy as np import matplotlib.pyplot as plt import matplotlib x = np.arange(1,10) r = np.random.random(x.size) fig1, ax = plt.subplots() ln1 = ax