You could just split up your data according to the three sections you have, graph each group separately, and then attach the graphs together:
fig, axes = plt.subplots(1, 3, sharey=True)
Y = [0, 1, 2, 4, 2, 1, 2, 3, 2, 0, 1, 2, 2, 3]
Y0 = Y[0:6]
Y1 = Y[5:10]
Y2 = Y[9:15]
axes[0].plot(Y0)
axes[1].plot(Y1)
axes[2].plot(Y2)
plt.ylim([0, 5])
subplots_adjust(wspace=0)
That will get you pretty close to what you need (though I admit some of the the x-axes could use a little extra formatting):
If I were you I would enter that line by line, hitting plt.draw()
after every line of matplotlib code to see what exactly is going on.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…