Parameters: |
- evokeds : instance of mne.Evoked | list | dict
If a single Evoked instance, it is plotted as a time series.
If a dict whose values are Evoked objects, the contents are plotted as
single time series each and the keys are used as condition labels.
If a list of Evokeds, the contents are plotted with indices as labels.
If a [dict/list] of lists, the unweighted mean is plotted as a time
series and the parametric confidence interval is plotted as a shaded
area. All instances must have the same shape - channel numbers, time
points etc.
If dict, keys must be of type str.
- picks : None | int | list of int
If int or list of int, the indices of the sensors to average and plot.
If multiple channel types are selected, one figure will be returned for
each channel type.
If the selected channels are gradiometers, the signal from
corresponding (gradiometer) pairs will be combined.
If None, it defaults to all data channels, in which case the global
field power will be plotted for all channel type available.
- gfp : bool
If True, the channel type wise GFP is plotted.
If picks is an empty list (default), this is set to True.
- colors : list | dict | None
If a list, will be sequentially used for line colors.
If a dict, can map evoked keys or ‘/’-separated (HED) tags to
conditions.
For example, if evokeds is a dict with the keys “Aud/L”, “Aud/R”,
“Vis/L”, “Vis/R”, colors can be dict(Aud=’r’, Vis=’b’) to map both
Aud/L and Aud/R to the color red and both Visual conditions to blue.
If None (default), a sequence of desaturated colors is used.
If cmap is None, colors will indicate how each condition is
colored with reference to its position on the colormap - see cmap
below. In that case, the values of colors must be either integers,
in which case they will be mapped to colors in rank order; or floats
between 0 and 1, in which case they will be mapped to percentiles of
the colormap.
- linestyles : list | dict
If a list, will be sequentially and repeatedly used for evoked plot
linestyles.
If a dict, can map the evoked keys or ‘/’-separated (HED) tags to
conditions.
For example, if evokeds is a dict with the keys “Aud/L”, “Aud/R”,
“Vis/L”, “Vis/R”, linestyles can be dict(L=’–’, R=’-‘) to map both
Aud/L and Vis/L to dashed lines and both Right-side conditions to
straight lines.
- styles : dict | None
If a dict, keys must map to evoked keys or conditions, and values must
be a dict of legal inputs to matplotlib.pyplot.plot. These
parameters will be passed to the line plot call of the corresponding
condition, overriding defaults.
E.g., if evokeds is a dict with the keys “Aud/L”, “Aud/R”,
“Vis/L”, “Vis/R”, styles can be {“Aud/L”: {“linewidth”: 1}} to set
the linewidth for “Aud/L” to 1. Note that HED (‘/’-separated) tags are
not supported.
- cmap : None | str | tuple
If not None, plot evoked activity with colors from a color gradient
(indicated by a str referencing a matplotlib colormap - e.g., “viridis”
or “Reds”).
If evokeds is a list and colors is None, the color will
depend on the list position. If colors is a list, it must contain
integers where the list positions correspond to evokeds , and the
value corresponds to the position on the colorbar.
If evokeds is a dict, colors should be a dict mapping from
(potentially HED-style) condition tags to numbers corresponding to
positions on the colorbar - rank order for integers, or floats for
percentiles. E.g.,
evokeds={"cond1/A": ev1, "cond2/A": ev2, "cond3/A": ev3, "B": ev4},
cmap='viridis', colors=dict(cond1=1 cond2=2, cond3=3),
linestyles={"A": "-", "B": ":"}
If cmap is a tuple of length 2, the first item must be
a string which will become the colorbar label, and the second one
must indicate a colormap, e.g.
cmap=('conds', 'viridis'), colors=dict(cond1=1 cond2=2, cond3=3),
- vlines : “auto” | list of float
A list in seconds at which to plot dashed vertical lines.
If “auto” and the supplied data includes 0, it is set to [0.]
and a vertical bar is plotted at time 0.
- ci : float | callable | None | bool
If not None and evokeds is a [list/dict] of lists, a shaded
confidence interval is drawn around the individual time series. If
float, a percentile bootstrap method is used to estimate the confidence
interval and this value determines the CI width. E.g., if this value is
.95 (the default), the 95% confidence interval is drawn. If a callable,
it must take as its single argument an array (observations x times) and
return the upper and lower confidence bands.
If None or False, no confidence band is plotted.
If True, a 95% bootstrapped confidence interval is drawn.
- truncate_yaxis : bool | str
If not False, the left y axis spine is truncated to reduce visual
clutter. If ‘max_ticks’, the spine is truncated at the minimum and
maximum ticks. Else, it is truncated to half the max absolute value,
rounded to .25. Defaults to “max_ticks”.
- truncate_xaxis : bool
If True, the x axis is truncated to span from the first to the last.
xtick. Defaults to True.
- ylim : dict | None
ylim 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.
- invert_y : bool
If True, negative values are plotted up (as is sometimes done
for ERPs out of tradition). Defaults to False.
- show_sensors: bool | int | str | None
If not False, channel locations are plotted on a small head circle.
If int or str, the position of the axes (forwarded to
mpl_toolkits.axes_grid1.inset_locator.inset_axes ).
If None, defaults to True if gfp is False, else to False.
- show_legend : bool | str | int
If not False, show a legend. If int or str, it is the position of the
legend axes (forwarded to
mpl_toolkits.axes_grid1.inset_locator.inset_axes ).
- split_legend : bool
If True, the legend shows color and linestyle separately; colors must
not be None. Defaults to True if cmap is not None, else defaults to
False.
- axes : None | matplotlib.axes.Axes instance | list of axes
What axes to plot to. If None, a new axes is created.
When plotting multiple channel types, can also be a list of axes, one
per channel type.
- title : None | str
If str, will be plotted as figure title. If None, the channel names
will be shown.
- show : bool
If True, show the figure.
|