Skip to content

ax.ignore_existing_data_limits is undocumented + view scaling documentation #18401

Open

Description

@ianhi

Problem

This is two fold, first is the initial motivation for this issue and second is the general problem that the first is a microcosm of:

1.
Axes objects have a boolean attribute ignore_existing_data_limits that returns no results when searched for on the docs: https://matplotlib.org/3.3.1/search.html?q=ignore_existing_data_limits

This variable is important for using relim and autoscale_view when updating the offsets of a scatterplot as can be seen in this SO answer: https://stackoverflow.com/a/51327480/835607. There is also a comment on that answer wondering what the purpose of ax.ignore_existing_data_limits = True is.

2.
More generally, there is not much documentation on how to update the view extent/datalims of an axis after adding artists or collections. What there is can at times be confusing someone (i.e. me) trying to work through how to dynamically update plots. For example, the docstring of relim says that it will not work for collections but it's not clear what I should use instead of relim. But I know from pyplot functions such as hist and scatter it is clear that it is possible to update the datalims to account for collections.

Suggested Improvement

It would be awesome to have a tutorial dedicated to explaining the interactions between and how to use all of the following:
relim
autoscale
autoscale_view
datalim
xlim/ylim
other things I don't know about yet

basically a tutorial that could be used a one stop shop for understanding how to automatically update the view extent of an axis to match any updates that might be applied either via interaction or an animation.

Activity

  1. QuLogic commented on Sep 3, 2020

    @QuLogic
    Member

    I'm not sure whether ignore_existing_data_limits is a public API, or some internal state, though I guess it appears that people use it already.

  2. anntzer commented on Sep 4, 2020

    @anntzer
    Contributor

    See discussion at #17106. (I think ignore_existing_data_limits should go away, but as always "it's complicated".)

  3. github-actions commented on Aug 18, 2023

    @github-actions

    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!

  4. ianhi commented on Aug 18, 2023

    @ianhi
    ContributorAuthor

    This is still an issue

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions