- mne.viz.plot_evoked(evoked, picks=None, exclude='bads', unit=True, show=True, ylim=None, xlim='tight', proj=False, hline=None, units=None, scalings=None, titles=None, axes=None, gfp=False, window_title=None, spatial_colors=False, zorder='unsorted', selectable=True, noise_cov=None, time_unit='s', sphere=None, *, highlight=None, verbose=None)#
Plot evoked data using butterfly plots.
Left click to a line shows the channel name. Selecting an area by clicking and holding left mouse button plots a topographic map of the painted area.
If bad channels are not excluded they are shown in red.
- evokedinstance of
The evoked data.
str| array_like |
Channels to include. Slices and lists of integers will be interpreted as channel indices. In lists, channel type strings (e.g.,
['meg', 'eeg']) will pick channels of those types, channel name strings (e.g.,
['MEG0111', 'MEG2623']will pick the given channels. Can also be the string values “all” to pick all channels, or “data” to pick data channels. None (default) will pick all channels. Note that channels in
info['bads']will be included if their names or indices are explicitly provided.
Channels names to exclude from being shown. If ‘bads’, the bad channels are excluded.
Scale plot with channel (SI) unit.
Show figure if True.
Y limits for plots (after scaling has been applied). e.g. ylim = dict(eeg=[-20, 20]) Valid keys are eeg, mag, grad, misc. If None, the ylim parameter for each channel equals the pyplot default.
- xlim‘tight’ |
X limits for plots.
bool| ‘interactive’ | ‘reconstruct’
If true SSP projections are applied before display. If ‘interactive’, a check box for reversible selection of SSP projection vectors will be shown. If ‘reconstruct’, projection vectors will be applied and then M/EEG data will be reconstructed via field mapping to reduce the signal bias caused by projection.
Changed in version 0.21: Support for ‘reconstruct’ was added.
The values at which to show an horizontal line.
The units of the channel types used for axes labels. If None, defaults to
dict(eeg='µV', grad='fT/cm', mag='fT').
The scalings of the channel types to be applied for plotting. If None, defaults to
dict(eeg=1e6, grad=1e13, mag=1e15).
The titles associated with the channels. If None, defaults to
dict(eeg='EEG', grad='Gradiometers', mag='Magnetometers').
- axesinstance of
The axes to plot to. If list, the list must be a list of Axes of the same length as the number of channel types. If instance of Axes, there must be only one channel type plotted.
Plot the global field power (GFP) or the root mean square (RMS) of the data. For MEG data, this will plot the RMS. For EEG, it plots GFP, i.e. the standard deviation of the signal across channels. The GFP is equivalent to the RMS of an average-referenced signal.
Plot GFP or RMS (for EEG and MEG, respectively) and traces for all channels.
Plot GFP or RMS (for EEG and MEG, respectively), and omit the traces for individual channels.
The color of the GFP/RMS trace will be green if
spatial_colors=False, and black otherwise.
Changed in version 0.23: Plot GFP for EEG instead of RMS. Label RMS traces correctly as such.
The title to put at the top of the figure.
If True, the lines are color coded by mapping physical sensor coordinates into color values. Spatially similar channels will have similar colors. Bad channels will be dotted. If False, the good channels are plotted black and bad channels red. If
'auto', uses True if channel locations are present, and False if channel locations are missing or if the data contains only a single channel. Defaults to
Which channels to put in the front or back. Only matters if
spatial_colorsis used. If str, must be
std, data with the lowest standard deviation (weakest effects) will be put in front so that they are not obscured by those with stronger effects. If
unsorted, channels are z-sorted as in the evoked instance. If callable, must take one argument: a numpy array of the same dimensionality as the evoked raw data; and return a list of unique integers corresponding to the number of channels.
New in v0.13.0.
Whether to use interactive features. If True (default), it is possible to paint an area to draw topomaps. When False, the interactive features are disabled. Disabling interactive features reduces memory consumption and is useful when using
axesparameter to draw multiaxes figures.
New in v0.13.0.
- noise_covinstance of
Noise covariance used to whiten the data while plotting. Whitened data channel names are shown in italic. Can be a string to load a covariance from disk. See also
mne.Evoked.plot_white()for additional inspection of noise covariance properties when whitening evoked data. For data processed with SSS, the effective dependence between magnetometers and gradiometers may introduce differences in scaling, consider using
New in v0.16.0.
The units for the time axis, can be “s” (default) or “ms”.
New in v0.16.
float| array_like | instance of
None| ‘auto’ | ‘eeglab’
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
ConductorModelto use the origin and radius from that object. If
'auto'the sphere is fit to digitization points. If
'eeglab'the head circle is defined by EEG electrodes
'Fpz'is not present, it will be approximated from the coordinates of
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
- highlightarray_like of
float, shape(2,) | array_like of
float, shape (n, 2) |
Segments of the data to highlight by means of a light-yellow background color. Can be used to put visual emphasis on certain time periods. The time periods must be specified as
array-likeobjects in the form of
(t_start, t_end)in the unit given by the
time_unitparameter. Multiple time periods can be specified by passing an
array-likeobject of individual time periods (e.g., for 3 time periods, the shape of the passed object would be
(3, 2). If
None, no highlighting is applied.
New in v1.1.
- evokedinstance of
- figinstance of
Figure containing the butterfly plots.
- figinstance of