ABra1993
(Amber Brands)
March 3, 2021, 9:16am
1
When I use mne.viz to create a figure (both in Jupyter Notebook as Atom), a window is opened containing the plot but I can’t open/access it or see the plot.
My code:
renderer = mne.viz.backends.renderer.create_3d_figure(size=(600, 600), bgcolor='w', scene=False)
gray = (0.5, 0.5, 0.5)
renderer.mesh(*rr_mm.T, triangles=tris, color=gray)
view_kwargs = dict(elevation=90, azimuth=0)
mne.viz.set_3d_view(figure=renderer.figure, distance=350, focalpoint=(0., 0., 40.), **view_kwargs)
renderer.show()
Practical info:
MNE-Python version: 0.22.0
operating system: macOS Big Sur 11.2.1
richard
(Richard Höchenberger)
March 3, 2021, 9:45am
2
Hello, that’s something we recently fixed in the development version:
mne-tools:main
← hoechenberger:pyvista-stc-macos-11
opened 10:04AM - 25 Feb 21 UTC
You can either try installing the development version by running
pip install -U https://github.com/mne-tools/mne-python/archive/main.zip
or manually setting the environment variable QT_MAC_WANTS_LAYER
to 1
.
ABra1993
(Amber Brands)
March 3, 2021, 11:02am
3
Thank you!
I set the env variable and the plots are created. However, the problem I have now is that the windows close immediately after they are created.
richard
(Richard Höchenberger)
March 3, 2021, 12:38pm
4