mne.viz.plot_epochs_psd_topomap(epochs, bands=None, vmin=None, vmax=None, tmin=None, tmax=None, proj=False, bandwidth=None, adaptive=False, low_bias=True, normalization='length', ch_type=None, cmap=None, agg_fun=None, dB=False, n_jobs=1, normalize=False, cbar_fmt='auto', outlines='head', axes=None, show=True, sphere=None, vlim=None, None, verbose=None)[source]

Plot the topomap of the power spectral density across epochs.

epochsinstance of Epochs

The epochs object.

bandslist of tuple | None

The frequencies or frequency ranges to plot. Length-2 tuples specify a single frequency and a subplot title (e.g., (6.5, 'presentation rate')); length-3 tuples specify lower and upper band edges and a subplot title. If None (the default), expands to:

bands = [(0, 4, 'Delta'), (4, 8, 'Theta'), (8, 12, 'Alpha'),
         (12, 30, 'Beta'), (30, 45, 'Gamma')]

In bands where a single frequency is provided, the topomap will reflect the single frequency bin that is closest to the provided value.


Deprecated; use vlim instead.


Deprecated; use vlim instead.

tminfloat | None

Start time to consider.

tmaxfloat | None

End time to consider.


Apply projection.


The bandwidth of the multi taper windowing function in Hz. The default value is a window half-bandwidth of 4 Hz.


Use adaptive weights to combine the tapered spectra into PSD (slow, use n_jobs >> 1 to speed up computation).


Only use tapers with more than 90% spectral concentration within bandwidth.


Either “full” or “length” (default). If “full”, the PSD will be normalized by the sampling rate as well as the length of the signal (as in nitime).

ch_type‘mag’ | ‘grad’ | ‘planar1’ | ‘planar2’ | ‘eeg’ | None

The channel type to plot. For ‘grad’, the gradiometers are collected in pairs and the mean for each pair is plotted. If None, then first available channel type from order given above is used. Defaults to None.

cmapmatplotlib colormap | (colormap, bool) | ‘interactive’ | None

Colormap to use. If tuple, the first value indicates the colormap to use and the second value is a boolean defining interactivity. In interactive mode the colors are adjustable by clicking and dragging the colorbar with left and right mouse button. Left mouse button moves the scale up and down and right mouse button adjusts the range. Hitting space bar resets the range. Up and down arrows can be used to change the colormap. If None, 'Reds' is used for data that is either all-positive or all-negative, and 'RdBu_r' is used otherwise. 'interactive' is equivalent to (None, True). Defaults to None.


The function used to aggregate over frequencies. Defaults to numpy.sum() if normalize=True, else numpy.mean().


If True, transform data to decibels (with 10 * np.log10(data)) following the application of agg_fun. Ignored if normalize=True.


The number of jobs to run in parallel (default 1). Requires the joblib package.


If True, each band will be divided by the total power. Defaults to False.


Format string for the colorbar tick labels. If 'auto', is equivalent to ‘%0.3f’ if dB=False and ‘%0.1f’ if dB=True. Defaults to 'auto'.

outlines‘head’ | ‘skirt’ | dict | None

The outlines to be drawn. If ‘head’, the default head scheme will be drawn. If ‘skirt’ the head scheme will be drawn, but sensors are allowed to be plotted outside of the head circle. If dict, each key refers to a tuple of x and y positions, the values in ‘mask_pos’ will serve as image mask. Alternatively, a matplotlib patch object can be passed for advanced masking options, either directly or as a function that returns patches (required for multi-axis plots). If None, nothing will be drawn. Defaults to ‘head’.

axeslist of Axes | None

List of axes to plot consecutive topographies to. If None the axes will be created automatically. Defaults to None.


Show figure if True.

spherefloat | array_like | str | None

The sphere parameters to use for the cartoon head. Can be array-like of shape (4,) to give the X/Y/Z origin and radius in meters, or a single float to give the radius (origin assumed 0, 0, 0). Can also be a spherical ConductorModel, which will use the origin and radius. Can be “auto” to use a digitization-based fit. Can also be None (default) to use ‘auto’ when enough extra digitization points are available, and 0.095 otherwise. Currently the head radius does not affect plotting.

New in version 0.20.

vlimtuple of length 2 | ‘joint’

Colormap limits to use. If a tuple of floats, specifies the lower and upper bounds of the colormap (in that order); providing None for either entry will set the corresponding boundary at the min/max of the data (separately for each topomap). Elements of the tuple may also be callable functions which take in a NumPy array and return a scalar. If vlim='joint', will compute the colormap limits jointly across all topomaps of the same channel type, using the min/max of the data. Defaults to (None, None).

New in version 0.21.

verbosebool, str, int, or None

If not None, override default verbose level (see mne.verbose() and Logging documentation for more). If used, it should be passed as a keyword-argument only.

figinstance of Figure

Figure distributing one image per channel across sensor topography.

Examples using mne.viz.plot_epochs_psd_topomap