- MNE version: 0.24.1
- operating system: Ubuntu 20.04
I have been trying to save visualizations of MRI-MEG coregistration in an image file. This has proven particularly difficult. The documentation of
mne.viz.plot_alignment states that the function output is a
My code looks something like this:
fig = mne.viz.plot_alignment(info=info, trans=trans, subject=subject, dig=True, meg=['helmet', 'sensors'], subjects_dir=subjects_dir, surfaces='brain', mri_fiducials=fiducials, bem=bemmodel, verbose=True) mlab.savefig(fig_fname, figure=fig)
mlab.savefig() is the
mayavi method for saving figures.
This code results in an error,
_Figure object has no attribute 'scene'.
_Figure object appears to be an
mne.viz.backends._pyvista._Figure object instead of
This is where I’m stuck, so how would I continue from here, to save a screenshot of the coregistration in a script?
Thanks for your help everyone!