-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
ICA plot_components opens figure one by one (and might hang depending on the console) #11693
Comments
the plots are not created within a |
I have to say, this blocking/event-loop/backend aspect of
And for your proposition @drammock
I don't see an easy way to do it without adding an argument to flag if we are in a single execution ( Matplotlib backend used for testing: |
More discoveries! In #11696 I removed the recursion in But:
Speedy screencast to demonstrate (too bad it doesn't capture the mouse..) Screencast.from.05-15-2023.02.46.05.PM.webmAnd now the discovery part. It works on user-provided axes!
This works in all of those 4 tests and does not hang the interpreter in Spyder and Jupyter. Something is not behaving around here.. Lines 470 to 527 in 1e6aa7d
MNEFigure part since bypassing _figure also works.
|
mne-python/mne/viz/_mpl_figure.py Lines 78 to 85 in 1e6aa7d
What is the purpose of those lines? If we remove them, everything works fine in python, ipython, spyder and jupyter (still needs to be tested in VSCode, PyCharm). |
Description of the problem
A video will be clearer. Same behavior in a regular python console and in an IPython console.
Screencast.from.05-12-2023.04.45.47.PM.webm
The figure are shown one by one after you close the old one. At least in a python or IPython console, it works. In spyder, it hangs the console after you close the first figure 😞
Tested both in a working environment and in a fresh environment with only
pip install ipython mne
installed (MNE 1.4).Steps to reproduce
No idea what is causing it at the moment, will try to look into it. Might be related to #11654 and to #11510
The text was updated successfully, but these errors were encountered: