Running the following snippet non-interactively results in the figure closing almost immediately:
import mne
data_path = mne.datasets.sample.data_path()
stc_fname = data_path / "MEG" / "sample" / "sample_audvis-meg-eeg"
stc = mne.read_source_estimate(stc_fname)
stc.plot("sample", subjects_dir=data_path / "subjects")
Traceback:
Using pyvistaqt 3d backend.
Using control points [ 5.17909658 6.18448887 18.83197989]
Press Enter to close...^CError calling Python override of QWidget::eventFilter(): Traceback (most recent call last):
File "/Users/clemens/Projects/mne-python/.venv/lib/python3.14/site-packages/matplotlib/backends/backend_qt.py", line 265, in eventFilter
def eventFilter(self, source, event):
KeyboardInterrupt
source /Users/clemens/Projects/mne-python/.venv/bin/activate
Running the following snippet non-interactively results in the figure closing almost immediately:
Traceback: