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
Copy link
Copy Markdown
Member

@timhoffm timhoffm commented May 1, 2026

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
Copy link
Copy Markdown
Member Author

timhoffm commented May 1, 2026

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

inconsistent autoscaling around axvlines

2 participants