Skip to content

Conversation

mrinalcodez
Copy link

@mrinalcodez mrinalcodez commented Jul 24, 2025

PR summary

Quick fix for shared axis warning during .clear()

This PR implements a minimal, targeted fix for issue #30159, where calling .clear() on a shared axes — particularly with log scale — results in:

  • Limits being reset to (0, 1), which is invalid in log scale
  • Warnings emitted due to improper propagation of limits

This patch does a quick fix for the warnings in the issue but does not fully implement the proposed fix in issue #28851

What does this fix do?

  • Prevents resetting axis limits and scale in .clear() if the axis is shared
  • Ensures .clear() only clears data-like elements (lines, text, collections), not layout or shared state

What this does not do?

  • This does not define long-term .clear() semantics

PR checklist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Needs review
Development

Successfully merging this pull request may close these issues.

[Bug]: Calling axes.clear() on a shared y or x-axis issues an unexpected warning with log scale
1 participant