Skip to content

DOC: Explain the technical background of autoscaling#31673

Merged
tacaswell merged 1 commit into
matplotlib:mainfrom
timhoffm:doc-autoscale-background
May 15, 2026
Merged

DOC: Explain the technical background of autoscaling#31673
tacaswell merged 1 commit into
matplotlib:mainfrom
timhoffm:doc-autoscale-background

Conversation

@timhoffm

Copy link
Copy Markdown
Member

This adds an in-depth explanation on the different components relevant to autoscaling and how they interact.
This should help users with advanced autoscaling needs to set the relevant parts appropriately. It should also
serve maintainers as an overview how this currently works to give context when thinking on how to improve
the autoscaling mechanism.

@github-actions github-actions Bot added the Documentation: user guide files in galleries/users_explain or doc/users label May 14, 2026
#
# As a final step, the view limits can optionally be expanded outward to the
# nearest "nice" tick position, so that the axis edges coincide with tick
# marks. This is disabled by default, but can be turned on with the

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may want to add a comment that this is why tick Locators are involved in autoscaling at all.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Involvement of tick locators is necessarily implied if you want to find "nice" tick positions.

Why is it meaningful to explicitly mention this? Is there any specific user-facing API or restriction that would make it valuable to highlight this? I would have thought this doesn't play any role unless you want to dig into the details of limit rounding.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not strictly necessary, but I remember being confused by why locators mattered at all. (Another thing that makes this confusing is that round_numbers is not the default anymore, and probably not turned on very often.)
Anyways, either way is fine here, it was just a suggestion.

Comment thread galleries/users_explain/axes/autoscale.py
@timhoffm timhoffm force-pushed the doc-autoscale-background branch from d270950 to 8485193 Compare May 15, 2026 07:46
@timhoffm timhoffm force-pushed the doc-autoscale-background branch from 8485193 to dd96766 Compare May 15, 2026 08:37
@QuLogic QuLogic added this to the v3.11.0 milestone May 15, 2026

@anntzer anntzer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still the minor suggestion about the role of locators in round numbers, but I don't mind either way, it's already a clear improvement.

@tacaswell tacaswell merged commit 24f4e31 into matplotlib:main May 15, 2026
21 checks passed
@timhoffm timhoffm deleted the doc-autoscale-background branch May 15, 2026 18:52
rcomer added a commit that referenced this pull request May 15, 2026
…673-on-v3.11.x

Backport PR #31673 on branch v3.11.x (DOC: Explain the technical background of autoscaling)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation: user guide files in galleries/users_explain or doc/users

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants