FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add scale(x)(y) parameter(s) to imshow as in plot · Issue #18970 · matplotlib/matplotlib · GitHub

Repository navigation

Add scale(x)(y) parameter(s) to imshow as in plot #18970

Closed as not planned

Description

Problem

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:

if scalexy:
    im.set_extent(im.get_extent())

Activity

  1. anntzer commented on Nov 18, 2020

    Contributor

    I think that's basically #15595 (more or less...)?

  2. alexiscoutinho commented on Nov 18, 2020

    ContributorAuthor

    Yes.

  3. linked a pull request that will close this issueAdd set_in_autoscale() method #15595on Nov 19, 2020
  4. 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!

  5. timhoffm commented on Sep 15, 2023

    Member

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL