For an upcoming assignment I am require to make a series of diagrams that have two graphs that have a line going across from one graph to the other, colouring an area below that line on the other graph.
As shown in this rough drawing:

This is what I currently have:

From this code:
from matplotlib import pyplot as plt
fig = plt.figure()
ax1 = fig.add_subplot(121)
ax1.plot([0,1,2,3,4,5,6,7,8,9,10], [1,1,1,1,1,0,0,0,0,0,0], '-b')
ax1.plot([0,1,2,3,4,5,6,7,8,9,10], [0,0,0,0,0,1,1,1,1,1,1], '-r')
ax1.set_ylim([0, 1.2])
ax2 = fig.add_subplot(122)
ax2.plot([0,5,10,15,20,25,30,35,40], [1,1,1,1,0,0,0,0,0], '-b')
ax2.plot([0,5,10,15,20,25,30,35,40], [0,0,0,0,1,1,1,1,1], '-r')
ax2.set_ylim([0, 1.2])
plt.show()
Obviously this only generates the two graphs and I have yet been unable to add the line across the two graphs.
I really want to be able to do this with Matplotlib in python with the ability to change the value (45 in the example case) and the coloured area change automatically.
Thanks!
