title: matplotlib color gradient between two colors
body: <p>I want a color gradient between black and red in matplotlib, where the low values are black and become more and more red with increasing Y-value.   </p>
  
  <pre><code>import matplotlib.pyplot as plt
  xvals = np.arange(0, 1, 0.01)
  yvals = xvals
  plt.plot(xvals, yvals, "r")
  axes = plt.axes()
  plt.show()
  </code></pre>
  
  <p>What do I have to change to get such a color gradient?</p>