I try to combine some figures (ica properties) into more complex group of figures, but I have problems with suppressing plot in jupyter notebooks even in case of raw objecyt, when browser_backend is set to matplotlib
. Figure=False seems to be effective in Jupyter Lab (4.1.6) but not in Jupyter extension in Vscode (v2024.4.0).
import mne
import matplotlib.pyplot as plt
mne.viz.set_browser_backend("matplotlib")
sample_data_folder = mne.datasets.sample.data_path()
sample_data_raw_file = sample_data_folder / "MEG" / "sample" / "sample_audvis_raw.fif"
# the preload flag loads the data into memory now
raw = mne.io.read_raw_fif(sample_data_raw_file, preload=True)
raw.crop(tmax=10.0) # raw.crop() always happens in-place
fig_orig = raw.plot(show=False)
from mne.preprocessing import ICA
ica = ICA(n_components=2, max_iter="auto", random_state=97)
ica.fit(raw)
ica
ica_plot = ica.plot_properties(raw, show=False)
Platform macOS-14.4.1-arm64-arm-64bit
Python 3.12.2 | packaged by conda-forge | (main, Feb 16 2024, 20:54:21) [Clang 16.0.6 ]
Executable [/Users/daniel/.pyenv/versions/conda-paths-3.12/bin/python](https://file+.vscode-resource.vscode-cdn.net/Users/daniel/.pyenv/versions/conda-paths-3.12/bin/python)
CPU arm (8 cores)
Memory 16.0 GB
Core
ββ mne 1.7.0 (latest release)
ββ numpy 1.26.4 (unknown linalg bindings)
ββ scipy 1.13.0
ββ matplotlib 3.8.4 (backend=module://matplotlib_inline.backend_inline)
Numerical (optional)
ββ sklearn 1.4.2
ββ numba 0.59.1
ββ nibabel 5.2.1
ββ nilearn 0.10.4
ββ dipy 1.9.0
ββ openmeeg 2.5.8
ββ pandas 2.2.2
ββ h5io 0.2.2
ββ h5py 3.11.0
ββ unavailable cupy
Visualization (optional)
ββ pyvista 0.43.5 (OpenGL 4.1 Metal - 88 via Apple M1)
ββ pyvistaqt 0.11.0
ββ vtk 9.2.6
ββ qtpy 2.4.1 (PyQt5=5.15.8)
ββ ipympl 0.9.4
ββ pyqtgraph 0.13.5
ββ mne-qt-browser 0.6.2
ββ ipywidgets 8.1.2
ββ trame_client 3.0.2
ββ trame_server 3.0.0
ββ trame_vtk 2.8.5
ββ trame_vuetify 2.4.3
Ecosystem (optional)
ββ mne-bids 0.14
ββ mne-icalabel 0.6.0
ββ mne-bids-pipeline 1.8.0
ββ eeglabio 0.0.2-4
ββ edfio 0.4.0
ββ mffpy 0.8.0
ββ pybv 0.7.5
ββ unavailable mne-nirs, mne-features, mne-connectivity, neo