mne.viz.plot_dipole_locations

mne.viz.plot_dipole_locations(dipoles, trans, subject, subjects_dir=None, mode='orthoview', coord_frame='mri', idx='gof', show_all=True, ax=None, block=False, show=True, verbose=None)[source]

Plot dipole locations.

If mode is set to ‘cone’ or ‘sphere’, only the location of the first time point of each dipole is shown else use the show_all parameter.

The option mode=’orthoview’ was added in version 0.14.

Parameters
dipoleslist of instances of Dipole | Dipole

The dipoles to plot.

transdict

The mri to head trans.

subjectstr

The subject name corresponding to FreeSurfer environment variable SUBJECT.

subjects_dirNone | str

The path to the freesurfer subjects reconstructions. It corresponds to Freesurfer environment variable SUBJECTS_DIR. The default is None.

modestr

Currently only 'orthoview' is supported.

New in version 0.14.0.

coord_framestr

Coordinate frame to use, ‘head’ or ‘mri’. Defaults to ‘mri’.

New in version 0.14.0.

idxint | ‘gof’ | ‘amplitude’

Index of the initially plotted dipole. Can also be ‘gof’ to plot the dipole with highest goodness of fit value or ‘amplitude’ to plot the dipole with the highest amplitude. The dipoles can also be browsed through using up/down arrow keys or mouse scroll. Defaults to ‘gof’. Only used if mode equals ‘orthoview’.

New in version 0.14.0.

show_allbool

Whether to always plot all the dipoles. If True (default), the active dipole is plotted as a red dot and it’s location determines the shown MRI slices. The the non-active dipoles are plotted as small blue dots. If False, only the active dipole is plotted. Only used if mode equals ‘orthoview’.

New in version 0.14.0.

axinstance of matplotlib Axes3D | None

Axes to plot into. If None (default), axes will be created. Only used if mode equals ‘orthoview’.

New in version 0.14.0.

blockbool

Whether to halt program execution until the figure is closed. Defaults to False. Only used if mode equals ‘orthoview’.

New in version 0.14.0.

showbool

Show figure if True. Defaults to True. Only used if mode equals ‘orthoview’.

New in version 0.14.0.

verbosebool, str, int, or None

If not None, override default verbose level (see mne.verbose() and Logging documentation for more).

Returns
figinstance of mayavi.mlab.Figure or matplotlib.figure.Figure

The mayavi figure or matplotlib Figure.

Notes

New in version 0.9.0.