Hi again, developers. I found that Axes.autoscale_view, and therefore Axes.autoscale, won’t scale loosely when all of the children are images. Passing tight=False yields behavior just like tight=None. The attached script demonstrates this. In contrast, the docs for autoscale indicate that tight=False should force loose scaling. I believe the attached patch yields the desireable and documented behavior; would you please review it? Thank you.
For those who might need to work around the issue, the following can accomplish a loose scaling:
test_autoscale.py (1.27 KB)
axes.Axes.autoscale_view.patch (946 Bytes)
···
axes.autoscale_view() # tight scaling to image extent axes.set_xbound( *axes.xaxis.get_major_locator().view_limits( *axes.get_xbound())) axes.set_ybound( *axes.yaxis.get_major_locator().view_limits( *axes.get_ybound()))