Skip to content

FIX: axhline() / axvline() now always do autoscaling#31596

Draft
timhoffm wants to merge 1 commit into
matplotlib:mainfrom
timhoffm:fix-axvline-autoscale
Draft

FIX: axhline() / axvline() now always do autoscaling#31596
timhoffm wants to merge 1 commit into
matplotlib:mainfrom
timhoffm:fix-axvline-autoscale

Conversation

@timhoffm

@timhoffm timhoffm commented May 1, 2026

Copy link
Copy Markdown
Member

Closes #14651.

As they are regularly added wih add_line(), they were always added to the data limits, but autoscaling was only updated under certain conditions, which led to an inconsistent state. See #14651 (comment)

Because of the inconsistent state, I'll classify this as a bug fix and justify that change can happen immediately without a deprecation.

@timhoffm timhoffm force-pushed the fix-axvline-autoscale branch from f072289 to 48f8235 Compare May 1, 2026 10:19
@timhoffm timhoffm marked this pull request as draft May 1, 2026 10:48
@timhoffm

timhoffm commented May 1, 2026

Copy link
Copy Markdown
Member Author

This breaks some tests, in particular widgets. We likely need to exclude the lines there from autoscaling.

Closes matplotlib#14651.

As they are regularly added wih `add_line()`, they were always added to
the data limits, but autoscaling was only updated under certain
conditions, which led to an inconsistent state. See
matplotlib#14651 (comment)

Because of the inconsistent state, I'll classify this as a bug fix and
justify that change can happen immediately without a deprecation.
@timhoffm timhoffm force-pushed the fix-axvline-autoscale branch from 48f8235 to c52a12c Compare May 1, 2026 11:01
@melissawm melissawm added the API: changes Changes to the public API, typically requiring deprecation. label May 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API: changes Changes to the public API, typically requiring deprecation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

inconsistent autoscaling around axvlines

2 participants