-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[Bug]: Artist.remove() isn't fully removing it from figure #25572
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
Comments
likely related to this 2015 comment from @tacaswell : |
At the moment, I think you can workaround this by calling |
This is likely related to #25274, although this is likely different enough to warrant its own issue. The legend appears to be unstable right now. |
I do not think this is related to #25274 as in that case the |
that helped. thanks everyone! |
Bug summary
I am trying to remove some artists (
RadioButtons
andCheckButtons
) while keeping some others (axes with images), before exporting a figure to disk, and am running into this error:AttributeError: 'NoneType' object has no attribute 'canvas'
as MPL is trying to check if canvas for RadioButton has changed, although that RadioButton should not part of the equation at all as it was removed prior to trying to
.savefig()
Code for reproduction
Actual outcome
Expected outcome
smooth export with no error
Additional information
No response
Operating system
macOS 13
Matplotlib Version
3.7.1
Matplotlib Backend
TkAgg
Python version
3.11
Jupyter version
No response
Installation
pip
The text was updated successfully, but these errors were encountered: