In [ ]:
from mayavi import mlab
import surfer
import mne
subjects_dir = mne.datasets.sample.data_path() + '/subjects'

Default rendering (as string)


In [ ]:
surfer.Brain('sample', hemi='split', surf='white', subjects_dir=subjects_dir, size=(400, 200))

Rendering to PNG


In [ ]:
mlab.init_notebook('png')
surfer.Brain('sample', hemi='split', surf='white', subjects_dir=subjects_dir, size=(400, 200))

Rendering as ipy

Now it's interactive! Try rotating the figures.


In [ ]:
mlab.init_notebook('ipy', width=200, height=200)
surfer.Brain('sample', hemi='split', surf='white', subjects_dir=subjects_dir, size=(400, 200))