I am trying to plot a chart that shows the Observation data points, along with the corresponding prediction.
However, as I am plotting, the red Observation dots are not appearing on my plot; and I am unsure as to why.
They do appear when I run the following in another line:
fig = plt.figure(figsize = (20,6))
plt.plot(testY, 'r.', markersize=10, label=u'Observations')
plt.plot(predictedY, 'b-', label=u'Prediction')
But the code that I am using to plot does not allows them to show up:
def plotGP(testY, predictedY, sigma):
fig = plt.figure(figsize = (20,6))
plt.plot(testY, 'r.', markersize=10, label=u'Observations')
plt.plot(predictedY, 'b-', label=u'Prediction')
x = range(len(testY))
plt.fill(np.concatenate([x, x[::-1]]), np.concatenate([predictedY - 1.9600 * sigma, (predictedY + 1.9600 * sigma)[::-1]]),
alpha=.5, fc='b', ec='None', label='95% confidence interval')
subset = results_dailyData['2010-01':'2010-12']
testY = subset['electricity-kWh']
predictedY = subset['predictedY']
sigma = subset['sigma']
plotGP(testY, predictedY, sigma)
My current plot, where the red Observation points are not appearing.

The plot when I run the plotting code in it's own line. I'd like these dots and the blue line to appear in the plot above:


zorder.