FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

FIX: remove warning when clearing axes with shared axis by dkludwig · Pull Request #32069 · matplotlib/matplotlib · GitHub

Repository navigation

FIX: remove warning when clearing axes with shared axis - #32069

Merged
QuLogic merged 6 commits into
matplotlib:mainfrom
dkludwig:bugfix/9970-shared-axis-clear
Jul 22, 2026
Merged

QuLogic merged 6 commits into
matplotlib:mainfrom
dkludwig:bugfix/9970-shared-axis-clear

Conversation

dkludwig commented Jul 18, 2026 •
edited
Loading

Copy link
Copy Markdown
Contributor

PR summary

fig, (ax1, ax2) = plt.subplots(1, 2, sharex=True)
x = range(1, 10)
ax1.semilogx(x, x)
ax2.semilogx(x, x)
fig.clf()

Would result in the following warning:

/Users/ben2/a/scratch.py:8: UserWarning: Attempt to set non-positive xlim on a log-scaled axis will be ignored.
  fig.clf()

AI Disclosure

No AI was used

PR checklist

Copy link
Copy Markdown

Thank you for opening your first PR into Matplotlib!

If you have not heard from us in a week or so, please leave a new comment below and that should bring it to our attention. Most of our reviewers are volunteers and sometimes things fall through the cracks. We also ask that you please finish addressing any review comments on this PR and wait for it to be merged (or closed) before opening a new one, as it can be a valuable learning experience to go through the review process.

You can also join us on discourse chat for real-time discussion.

For details on testing, writing docs, and our review process, please see the developer guide.
Please let us know if (and how) you use AI, it will help us give you better feedback on your PR.

We strive to be a welcoming and open project. Please follow our Code of Conduct.

Copy link
Copy Markdown
Member

Can you please also add a test?

dkludwig force-pushed the bugfix/9970-shared-axis-clear branch from 34fbae0 to 0370a17 Compare July 19, 2026 12:52

Copy link
Copy Markdown
Contributor Author

Sure, should be good now

Comment thread lib/matplotlib/axes/_base.py Outdated
dkludwig force-pushed the bugfix/9970-shared-axis-clear branch from 43c6088 to 7be82a4 Compare July 22, 2026 00:23
QuLogic added this to the v3.11.2 milestone Jul 22, 2026
QuLogic merged commit 102a1d2 into matplotlib:main Jul 22, 2026
41 checks passed
timhoffm added a commit that referenced this pull request Jul 22, 2026
…069-on-v3.11.x

Backport PR #32069 on branch v3.11.x (FIX: remove warning when clearing axes with shared axis)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

clearing axes with shared axis with non-linear scales should not warn

4 participants


Back | FazBrowse Home | New Git URL