Question about plot_components

Hi, experts
I have some questions when I using ICA to correct artefacts.
Here is my script:

ica = mne.preprocessing.ICA(n_components=20, random_state=0)
ica.fit(filt_raw, picks='eeg')
ica.plot_sources(filt_raw)
ica.plot_components(outlines='head')

When I run

ica.plot_components(outlines='head')

The plot can show but the script cannot exit and there is no return about plot, I don’t know how to fix it.
Here is my version of the packages that may be useful.:
mne==1.3.1
scipy==1.10.1
matplotlib==3.7.1
My system is Windows 11.
Thanks a lot.

Have you experimented with the arguments to the function? See the API documentation:

https://mne.tools/stable/generated/mne.preprocessing.ICA.html#mne.preprocessing.ICA.plot_components

For example setting the show parameter to False.

Hello,

Please update your MNE version, IIRC, this issue was fixed in 1.4.1 or 1.4.2.

Mathieu