-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Add warning for multiple pyplot.figure calls with same ID #27992
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
It looks like appveyor failed trying to install the codecov uploader. |
The test failures looked unrelated, re-running. |
c8e7a8e
to
f36cdcf
Compare
Exclude the 'clear' argument
Made test more versatile
f36cdcf
to
18eb3e7
Compare
else: | ||
num = int(num) # crude validation of num argument | ||
if any([figsize, dpi, facecolor, edgecolor, not frameon, | ||
kwargs]) and num in allnums: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reading this one more time, I think we also need the warning around line 988 for the case were someone does:
fig = plt.figure()
plt.figure(fig, figsize=(2, 2)) # this should warn as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, added that as well
Failing tests are unrelated. |
PR summary
Closes #27978. This hopefully adds the relevant warning discussed in the issue
PR checklist