title: display image with maximum width keeping an equal ratio
body: <p>How to display an image with imshow on all the width of an axe (viewport) but keeping the ratio 'equal' ?</p>
  <pre><code>import matplotlib.pyplot as plt
  import numpy as np
  
  fig, ax = plt.subplots(nrows=2, figsize=(8,8))
  img = ax[0].imshow(np.random.random((10,10)), aspect='equal')
  line = ax[1].plot([12,34],[45,78])
  </code></pre>
  <p><a href="https://i.stack.imgur.com/i5tYw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/i5tYw.png" alt="enter image description here" /></a></p>
  <p>I would like that the image width be aligned on the line plot keeping an equal ratio even if that implies having blank around. My application has a zooming feature coded on the image in fact so I would to offer all the width possible for its display.</p>
  <p>So in few words, I would like the same width as with aspect='auto' but with square pixels.
  Is it possible ? Thanks.</p>