title: Matplotlib imshow() stretch to "fit width"
body: <p>I've got an image, and a measure associated with each column of its pixels. I'm using <code>pyplot</code> to create a figure with the image on top, and a plot of the column measurements below. I'm using something like this:</p>
  
  <pre><code>import numpy as np
  import matplotlib.pyplot as plt
  
  A = np.random.rand(34*52).reshape(34,52)
  means = np.average(A,axis=0)
  
  plt.figure()
  
  plt.subplot(2,1,1)
  plt.imshow(A, interpolation='nearest' )
  
  plt.subplot(2,1,2)
  plt.plot(means)
  
  plt.show()
  </code></pre>
  
  <p>How can I stretch the image's width to the match that of the plots. That way, when looking at the measurements in the plot, the souce pixels will be in a column directly above it.</p>