title: How to save a pcolormesh image from matplotlib
body: <p>super simple question but I've been stuck on it for too long and haven't found anything to help.</p>
  
  <p>Using the following code I generate an image that I can see in spyder, but nevertheless when I call the save function, it saves an empty (all white) image.</p>
  
  <pre><code>x,y = np.meshgrid(xs, ys)
  z = np.array(zs)
  
  fig = plt.figure(figsize=(2,8))
  plt.pcolormesh(x, y, z.T, cmap='RdYlGn')
  plt.colorbar()
  plt.show()
  plt.savefig('test.png')
  </code></pre>
  
  <p>this is what I see in the IDE:</p>
  
  <p><a href="https://i.stack.imgur.com/VdaEN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VdaEN.png" alt="enter image description here"></a></p>
  
  <p>this is what gets saved:</p>
  
  <p><a href="https://i.stack.imgur.com/JkRlI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JkRlI.png" alt="enter image description here"></a></p>