Last active
April 8, 2020 18:22
-
-
Save JohnAtl/79480a144803a1996181d04d6eb5aa6b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Traceback (most recent call last): | |
File "<input>", line 1, in <module> | |
File "/Applications/PyCharm with Anaconda plugin .app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_umd.py", line 197, in runfile | |
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script | |
File "/Applications/PyCharm with Anaconda plugin .app/Contents/plugins/python/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile | |
exec(compile(contents+"\n", file, 'exec'), glob, loc) | |
File "/Users/john/PycharmProjects/mne-test/mne-test.py", line 16, in <module> | |
ica.plot_properties(raw, picks=ica.exclude) | |
File "/Users/john/PycharmProjects/mne-test/venv/lib/python3.7/site-packages/mne/preprocessing/ica.py", line 1633, in plot_properties | |
figsize=figsize, show=show, reject=reject) | |
File "/Users/john/PycharmProjects/mne-test/venv/lib/python3.7/site-packages/mne/viz/ica.py", line 472, in plot_ica_properties | |
plt_show(show) | |
File "/Users/john/PycharmProjects/mne-test/venv/lib/python3.7/site-packages/mne/viz/utils.py", line 110, in plt_show | |
(fig or plt).show(**kwargs) | |
File "/Users/john/PycharmProjects/mne-test/venv/lib/python3.7/site-packages/matplotlib/pyplot.py", line 272, in show | |
return _show(*args, **kw) | |
File "/Applications/PyCharm with Anaconda plugin .app/Contents/plugins/python/helpers/pycharm_matplotlib_backend/backend_interagg.py", line 27, in __call__ | |
manager.show(**kwargs) | |
File "/Applications/PyCharm with Anaconda plugin .app/Contents/plugins/python/helpers/pycharm_matplotlib_backend/backend_interagg.py", line 99, in show | |
self.canvas.show() | |
File "/Applications/PyCharm with Anaconda plugin .app/Contents/plugins/python/helpers/pycharm_matplotlib_backend/backend_interagg.py", line 64, in show | |
self.figure.tight_layout() | |
File "/Users/john/PycharmProjects/mne-test/venv/lib/python3.7/site-packages/matplotlib/cbook/deprecation.py", line 358, in wrapper | |
return func(*args, **kwargs) | |
File "/Users/john/PycharmProjects/mne-test/venv/lib/python3.7/site-packages/matplotlib/figure.py", line 2482, in tight_layout | |
subplotspec_list = get_subplotspec_list(self.axes) | |
File "/Users/john/PycharmProjects/mne-test/venv/lib/python3.7/site-packages/matplotlib/tight_layout.py", line 249, in get_subplotspec_list | |
subplotspec = subplotspec.get_topmost_subplotspec() | |
AttributeError: 'NoneType' object has no attribute 'get_topmost_subplotspec' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import numpy as np | |
import mne | |
# Found these suggested settings, but they don't seem to matter. | |
#os.environ['ETS_TOOLKIT'] = 'qt4' | |
#os.environ['QT_API'] = 'pyqt5' | |
sample_data_folder = mne.datasets.sample.data_path() | |
sample_data_raw_file = os.path.join(sample_data_folder, 'MEG', 'sample', | |
'sample_audvis_filt-0-40_raw.fif') | |
raw = mne.io.read_raw_fif(sample_data_raw_file) | |
ica = mne.preprocessing.ICA(n_components=20, random_state=97, max_iter=800) | |
ica.fit(raw) | |
ica.exclude = [1, 2] | |
ica.plot_properties(raw, picks=ica.exclude) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment