mne.viz.plot_montage#

mne.viz.plot_montage(montage, *, scale=1.0, show_names=True, kind='topomap', show=True, sphere=None, axes=None, verbose=None)[source]#

Plot a montage.

Parameters:
montageinstance of DigMontage

The montage to visualize.

scalefloat

Determines the scale of the channel points and labels; values < 1 will scale down, whereas values > 1 will scale up.

show_namesbool | list

Whether to display all channel names. If a list, only the channel names in the list are shown. Defaults to True.

kindstr

Whether to plot the montage as ‘3d’ or ‘topomap’ (default).

showbool

Show figure if True.

spherefloat | array_like of float | instance of ConductorModel | str | list of str | None

The sphere parameters to use for the head outline. Can be array-like of shape (4,) to give the X/Y/Z origin and radius in meters, or a single float to give just the radius (origin assumed 0, 0, 0). Can also be an instance of a spherical ConductorModel to use the origin and radius from that object. Can also be a str, in which case:

  • 'auto': the sphere is fit to external digitization points first, and to external + EEG digitization points if the former fails.

  • 'eeglab': the head circle is defined by EEG electrodes 'Fpz', 'Oz', 'T7', and 'T8' (if 'Fpz' is not present, it will be approximated from the coordinates of 'Oz').

    • 'extra': the sphere is fit to external digitization points.

    • 'eeg': the sphere is fit to EEG digitization points.

    • 'cardinal': the sphere is fit to cardinal digitization points.

    • 'hpi': the sphere is fit to HPI coil digitization points.

Can also be a list of str, in which case the sphere is fit to the specified digitization points, which can be any combination of 'extra', 'eeg', 'cardinal', and 'hpi', as specified above. None (the default) is equivalent to 'auto' when enough extra digitization points are available, and (0, 0, 0, 0.095) otherwise.

New in v0.20.

Changed in version 1.1: Added 'eeglab' option.

Changed in version 1.11: Added 'extra', 'eeg', 'cardinal', 'hpi' and list of str options.

axesinstance of Axes | instance of Axes3D | None

Axes to draw the sensors to. If kind='3d', axes must be an instance of Axes3D. If None (default), a new axes will be created.

New in v1.4.

verbosebool | str | int | None

Control verbosity of the logging output. If None, use the default verbosity level. See the logging documentation and mne.verbose() for details. Should only be passed as a keyword argument.

Returns:
figinstance of matplotlib.figure.Figure

The figure object.