I am using the following code to plot three curves (1. mean value, 2. uncertainty/error, and 3. measured data), however, I can't get the desired legends for all the three curves. I could get legends for 'mean' and 'measured data' as blue solid line and red circles, respectively, however, I can't get the blue patch as a legend for 'uncertainty'. I am using Python 2.7 version with Spyder.
qErr = np.std(qArray, axis=1)
h1 = plt.semilogy(T, qArray[:, 2], 'b-', label = 'Mean')
h2 = plt.fill_between(T, qArray[:, 2] - qErr, qArray[:, 2] + qErr, facecolor='b', alpha = 0.2)
plt.hold
h3 = plt.semilogy(T, ORate[idxt0:], 'ro')
plt.legend([h1, h2, h3], ['Mean', 'Uncertainty', 'Measured Data'])