title: Scaling images generated by imshow
body: <p>The following code snippet</p>
  
  <pre><code>import matplotlib.pyplot as plt
  import numpy as np
  
  arr1 = np.arange(100).reshape((10,10))
  arr2 = np.arange(25).reshape((5,5))
  
  fig, (ax1, ax2, ) = plt.subplots(nrows=2, figsize=(3,5))
  ax1.imshow(arr1, interpolation="none")
  ax2.imshow(arr2, interpolation="none")
  
  plt.tight_layout()
  plt.show()
  </code></pre>
  
  <p>produces two images with the same size, but a much lower "pixel density" in the second one. </p>
  
  <p><a href="https://i.stack.imgur.com/eEQW6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eEQW6.png" alt="enter image description here"></a></p>
  
  <p>I would like to have the second image plotted at the same scale (i.e. pixel density) of the first, without filling the subfigure, possibly correctly aligned (i.e. the origin of the image in the same subplot position as the first one.)</p>
  
  <p><strong>Edit</strong></p>
  
  <p>The shapes of <code>arr1</code> and <code>arr2</code> are only an example to show the problem. What I'm looking for is a way to ensure that two different images generated by <code>imshow</code> in different portions of the figure are drawn at exactly the same scale.</p>