# set up and fit the ICA
ica = mne.preprocessing.ICA(n_components=20, random_state=97, max_iter=800)
ica.fit(raw)
ica.exclude = [1, 2] # details on how we picked these are omitted here
ica.plot_properties(raw, picks=ica.exclude)
Instead of the results of the ICA.
Also, the last output line before that is: /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/mne/viz/evoked.py:116: MatplotlibDeprecationWarning: The resize_event function was deprecated in Matplotlib 3.6 and will be removed two minor releases later. Use callbacks.process('resize_event', ResizeEvent(...)) instead.
I don’t know what any of this means, any help is immensely appreciated.
It appears you’re running your code from a non-interactive Python session (via python3 ...), hence the figure will close immediately once the end of your script is reached. You can prevent this from happening by running Python with the -i switch (python3 -i ...), or by running the code in an interactive session, e.g. in IPython or Jupyter.
This is a warning that you can ignore. The MNE-Python developers will have to take care of this in a future release, but for now, it shouldn’t affect your work.
Hello Richard, took me quite some time but it did work in the end, so thank you so much! I’ll probably work solely in an interactive session from now on
Best!