-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Any resizing of the plot after plt.show results in an error when closing the window #24395
Comments
I can confirm this, however I get the traceback (in IPython with
which is printed rather than raised in the process. If you do attn @richardsheridan |
Given that this is "just" printing, I think this is an annoyance rather than a critical bug. |
I'm a bit confused by the current |
Something clicked on this while working on a different bug. It now seems like a straightforward fix, just disconnect that callback on line 3290 when it's no longer needed. |
Bug summary
After plt.show(), clicking on configure subplots and changing any parameter results in an error after closing the window.
Code for reproduction
Actual outcome
Traceback (most recent call last):
File "C:\Users\Bob\AppData\Local\Programs\Python\Python310\lib\site-packages\matplotlib\cbook_init_.py", line 307, in process
func(*args, **kwargs)
File "C:\Users\Bob\AppData\Local\Programs\Python\Python310\lib\site-packages\matplotlib\backend_bases.py", line 3290, in
"close_event", lambda e: manager.destroy())
File "C:\Users\Bob\AppData\Local\Programs\Python\Python310\lib\site-packages\matplotlib\backends_backend_tk.py", line 529, in destroy
self._window_dpi.trace_remove('write', self.window_dpi_cbname)
File "C:\Users\Bob\AppData\Local\Programs\Python\Python310\lib\tkinter_init.py", line 455, in trace_remove
self._tk.deletecommand(cbname)
_tkinter.TclError: can't delete Tcl command
Expected outcome
Close without error
Additional information
No response
Operating system
Windows 10
Matplotlib Version
matplotlib-3.6.2
Matplotlib Backend
No response
Python version
3.10
Jupyter version
No response
Installation
pip
The text was updated successfully, but these errors were encountered: