title: Different background colour areas on matplotlib plot
body: <p>I'm plotting a variable which changes over time, and I want to indicate the severity of the variable in a traffic light style.</p>
  
  <pre><code> |
   |
   |           red
   |
   |
  y|              /
   |             /   yellow
   |      ___   /
   |     /   \_/
   |    /           green
   |   /
   |_____________________________
               x
  </code></pre>
  
  <p>So for low y values, the background is green, for intermediate it's yellow/amber, and for high values it's red.  It would end up looking a bit like a three-striped flag.</p>
  
  <p>It's made more complicated by the fact that I'm replotting this frequently and the y scale may change, so I can't just put fixed boxes on the plot, unless maybe I calculate the box size every time I plot.</p>
  
  <p>Is there a way to do this with matplotlib?</p>
  
  <p>My plotting code at the moment:</p>
  
  <pre><code>import matplotlib.pyplot as plt
  
  plt.plot(x, y, 'k')
  plt.grid(b=True)
  ax = plt.gca()
  ax.set_facecolor("some colour")
  </code></pre>