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
Windows are not shown with Tk + interactive mode, from matplotlib 3.4 #19935
Comments
My opinion is that this is the intended behavior. It is harmful to call Updating the docs would be very nice, I'll help where I can! |
@richardjgowers For documents, I think the Explicitly spinning the Event Loop is enough good, but I feel the more entry-level description of interactive mode is somewhat confusing.
However, I guess that we need |
A little farther down in that page there are some exceptions to those bullet points:
and
I think it is a subtle and possibly confusing point that interactive mode is not interactive unless you are working in a command prompt with event loop integration. That is, if you run a script with matplotlib code such as what you posted above, you will have a different result of interactivity compared with typing each command at the REPL.In my mind, the thing you need to do to get interactivity is pump GUI events, and Perhaps bringing these facts forward in |
You should replace this with |
Right, I didn't actually understand that point.
Thank you for the pointer. I would like also to mention that some backends behaved inconsistently on this point, but they are fixed. |
kngwyu commentedApr 11, 2021
Bug report
Bug summary
The behavior of Tk backend in interactive mode has changed. My code depends on the old behavior and does not work with matplotlib 3.4.
Code for reproduction
Actual outcome
No windows are shown with matplotlib >= 3.4.
I guess that #17789 is the trigger. Inserting
self._master.update_idletasks
worked, like:Expected outcome
The heatmap is interactively updated with matplotlib 3.3.4.
plt.pause(0.1)
works, but actually don't want to pause in my actual use case.BTW, thank you for encouraging me on twitter.
The text was updated successfully, but these errors were encountered: