title: Make matplotlib contour plot give a filled colorbar
body: <p>Take this example matplotlib plot</p>
  
  <pre><code>import matplotlib.pyplot as plt
  import numpy as np
  
  x = np.linspace(0, 4, 1000)
  y = np.linspace(-1, 1, 1000)
  xx, yy = np.meshgrid(x, y)
  z = np.sin(xx + yy**2)
  plt.figure()
  CS = plt.contourf(x, y, z)
  CS = plt.contour(x, y, z)
  plt.clabel(CS, fontsize=8, colors='black')
  cbar = plt.colorbar(CS)
  plt.savefig('test.png')
  </code></pre>
  
  <p>This produces </p>
  
  <p><a href="https://i.stack.imgur.com/U4MtQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/U4MtQ.png" alt="enter image description here"></a></p>
  
  <p>The colorbar is very hard to read, because it only puts lines for the colors, and the rest is white. </p>
  
  <p>How do I make the colorbar have filled colors, not just lines, like in the <a href="https://matplotlib.org/examples/pylab_examples/contourf_demo.html" rel="nofollow noreferrer">examples</a>?</p>