In situations where an Axes has a large background image/map (extent greater than axis limits) and the axis limits are supposed to be controlled by other artists, like paths, it would be very helpful to have toggling parameters like scalex and scaley as in Axes.plot. Right now, even if you fix the limits after imshow, the moment you let autoscale do its thing (which is desired) it rescales to show the whole image.
Proposed Solution
A very simple and probably naive solution would be to wrap the imshow line below in an if where scalexy is True by default:
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!
I close this in favor of #15595. It's better to have this as an Artist property rather than putting explicit scalex/scaley parameters in all kinds of plot functions.
Activity
anntzer commented on Nov 18, 2020
I think that's basically #15595 (more or less...)?
alexiscoutinho commented on Nov 18, 2020
Yes.
github-actions commented on Sep 15, 2023
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!
timhoffm commented on Sep 15, 2023
I close this in favor of #15595. It's better to have this as an Artist property rather than putting explicit scalex/scaley parameters in all kinds of plot functions.