Interests in plot iEEG, especially sEEG data in volumetric source space

Hi, I want to learn how to plot sEEG data in volumetric source space. I know now MNE has the function and some of you are trying to improve the plotting. I just want to know, how do I plot a figure as you guys do in sEEG example by myself? I found that you guys are using pyvista, or mayavi? I’m not quite sure how to start.

First take a look at the installation instructions, specifically the section on 3D plotting. Once all the required dependencies are there, then try running the code from the sEEG example locally on your machine. If that works, then you can start swapping in your own data and using functions like stc.plot_3d().

1 Like

Hi, I mean, what if I want to write a function like stc.plot_3d on my own, what package should I learn? Pyvista?

The new 3D viz in MNE-Python is all based on PyVista.

OK, got it! Thank you!

Hi,

@BarryLiu97 did you figure this out? I’m also trying to plot seeg contacts on a volume. However I’m using nilearn like so:

import matplotlib.pyplot as plt
import nibabel as nib
from nilearn.plotting import plot_anat

# Make up xyz coordinates in RAS space
xyz = [-21, 15, 14] # In mm, rather than m as needed for MNE
brainmask = nib.load('subject', 'mri', 'brainmask.mgz') # freesurfer mri
nii_fig = plot_anat(brainmask, title='MyChannel', display_mode='ortho', 
                    cut_coords=xyz, draw_cross=True)
nii_fig.add_markers([xyz], marker_color='r', marker_size=100)

However when I plot this the marker ends up in the wrong place. Any idea what I need to do? If possible, I’d also appreciate if you could share any code you’ve generated to do this. Thank you in advance!

Sorry, I dont know how to plot contacts in the volume. I needed to.plot that in a surface ras space using pyvista.