Skip to content

[Doc]: Document how many out of bounds ticks Locators should return #25146

Closed as not planned

Description

@dstansby

Documentation Link

No response

Problem

During discussion of #24436, and I think many other PRs and issues, we have (as a dev team) collectively been confused about what the behaviour of Locators should be when it comes to out of bounds ticks. We should decide and document the behaviour, partly for ourselves, and partly for third-parties using Locators (cf. #11518).

My opening suggestion is that we document:

Locators must return at least a single tick below vmin and a single tick above vmax

This is cautious in that it always provides a tick to clip when drawing at each end of the range.

Suggested improvement

No response

Activity

  1. anntzer commented on Feb 3, 2023

    @anntzer
    Contributor

    I suspect that this is also related to the old (pre mpl2.0, but still available as rcparam) autolimits mode where the axis limits would be expanded to the "next" tick position; this was implemented (I guess) by relying on locators returning the first tick outside (or at) the limits as well and using them for autolimits.
    Unless we want to deprecate that old autolimits mode (and which would break "classic" style) or grow an additional API on locators specifically to query these extra tick positions, we're probably stuck with that behavior.
    This only marginally helps with the documentation, but perhaps knowing the motivation for the behavior is useful.

  2. added a commit that references this issue on Feb 7, 2023
    8790e72
  3. dstansby commented on Feb 15, 2023

    @dstansby
    MemberAuthor

    I tried to enforce at least one tick less than/greater than in #25225, and lots of tests failed. Notably histograms started having limits set to != 0 at the bottom, which isn't great. So to make our lives easier for now, I propose we instead say:

    Locators must return at least a single tick at <= vmin and a single tick at >= vmax

  4. github-actions commented on Apr 20, 2026

    @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!

  5. added
    status: closed as inactiveIssues closed by the "Stale" Github Action. Please comment on any you think should still be open.
    on May 21, 2026
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

    Documentationstatus: closed as inactiveIssues closed by the "Stale" Github Action. Please comment on any you think should still be open.status: inactiveMarked by the “Stale” Github Action

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions