'Plot dipole locations in 3d.
Parameters
trans : dict
The mri to head trans.
subject : str
The subject name corresponding to FreeSurfer environment
variable SUBJECT.
subjects_dir : None | str
The path to the freesurfer subjects reconstructions.
It corresponds to Freesurfer environment variable SUBJECTS_DIR.
The default is None.
mode : str
Currently only ``\'orthoview\'`` is supported.
.. versionadded:: 0.14.0
coord_frame : str
Coordinate frame to use, \'head\' or \'mri\'. Defaults to \'mri\'.
.. versionadded:: 0.14.0
idx : int | \'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\'.
.. versionadded:: 0.14.0
show_all : bool
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\'.
.. versionadded:: 0.14.0
ax : instance of matplotlib Axes3D | None
Axes to plot into. If None (default), axes will be created.
Only used if mode equals \'orthoview\'.
.. versionadded:: 0.14.0
block : bool
Whether to halt program execution until the figure is closed.
Defaults to False. Only used if mode equals \'orthoview\'.
.. versionadded:: 0.14.0
show : bool
Show figure if True. Defaults to True.
Only used if mode equals \'orthoview\'.
.. versionadded:: 0.14.0
verbose : bool, str, int, or None
If not None, override default verbose level (see
:func:`mne.verbose` and :ref:`Logging documentation <tut_logging>`
for more).
Returns
fig : instance of mlab.Figure or matplotlib Figure
The mayavi figure or matplotlib Figure.
Notes
.. versionadded:: 0.9.0'

@verbose
def plot_locations(self, trans, subject, subjects_dir=None, mode='orthoview', coord_frame='mri', idx='gof', show_all=True, ax=None, block=False, show=True, verbose=None):

    from .viz import plot_dipole_locations
    dipoles = self
    if (mode in [None, 'cone', 'sphere']):
        dipoles = []
        for t in self.times:
            dipoles.append(self.copy())
            dipoles[(-1)].crop(t, t)
    elif (mode != 'orthoview'):
        raise ValueError(("mode    must    be    'cone',    'sphere'    or    'orthoview'.    Got    %s." % mode))
    return plot_dipole_locations(dipoles, trans, subject, subjects_dir, mode, coord_frame, idx, show_all, ax, block, show)
