Plot topographic maps of specific time-frequency intervals of TFR data.
AverageTFRThe AverageTFR object.
None | floatThe first time instant to display. If None the first time point available is used.
None | floatThe last time instant to display. If None the last time point available is used.
None | floatThe first frequency to display. If None the first frequency available is used.
None | floatThe last frequency to display. If None the last frequency available is used.
NoneThe channel type to plot. For ‘grad’, the gradiometers are collected in pairs and the mean for each pair is plotted. If None, then channels are chosen in the order given above.
tuple or list of length 2The time interval to apply rescaling / baseline correction. If None do not apply it. If baseline is (a, b) the interval is between “a (s)” and “b (s)”. If a is None the beginning of the data is used and if b is None then b is set to the end of the interval. If baseline is equal to (None, None) the whole time interval is used.
NonePerform baseline correction by
subtracting the mean baseline power (‘mean’)
dividing by the mean baseline power (‘ratio’)
dividing by the mean baseline power and taking the log (‘logratio’)
subtracting the mean baseline power followed by dividing by the mean baseline power (‘percent’)
subtracting the mean baseline power and dividing by the standard deviation of the baseline power (‘zscore’)
dividing by the mean baseline power, taking the log, and dividing by the standard deviation of the baseline power (‘zlogratio’)
If None no baseline correction is applied.
float | callable() | NoneLower and upper bounds of the colormap, in the same units as the data.
If vmin and vmax are both None, they are set at ± the
maximum absolute value of the data (yielding a colormap with midpoint
at 0). If only one of vmin, vmax is None, will use
min(data) or max(data), respectively. If callable, should
accept a NumPy array of data and return a
float.
NoneColormap 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 (default), ‘Reds’ is used for all positive data, otherwise defaults to ‘RdBu_r’. If ‘interactive’, translates to (None, True).
strAdd markers for sensor locations to the plot. Accepts matplotlib plot format string (e.g., ‘r+’). If True (default), circles will be used.
Plot a colorbar.
str | NoneThe unit of the channel type used for colorbar labels.
intThe resolution of the topomap image (n pixels along each side).
floatSide length per topomap in inches (only applies when plotting multiple topomaps at a time).
strString format for colorbar values.
callable()If True, show channel names on top of the map. If a callable is
passed, channel names will be formatted using the callable; e.g., to
delete the prefix ‘MEG ‘ from all channel names, pass the function
lambda x: x.replace('MEG ', ''). If mask is not None, only
significant sensors will be shown.
str | NonePlot title. If None (default), no title is displayed.
Axes | NoneThe axes to plot to. If None the axes is defined automatically.
Show figure if True.
dict | NoneThe 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’.
int | array of floatThe number of contour lines to draw. If 0, no contours will be drawn. When an integer, matplotlib ticker locator is used to find suitable values for the contour thresholds (may sometimes be inaccurate, use array for accuracy). If an array, the values represent the levels for the contours. If colorbar=True, the ticks in colorbar correspond to the contour levels. Defaults to 6.
float | array-like | instance of ConductorModel | 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 ConductorModel to 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', 'Oz', 'T7', and 'T8' (if 'Fpz' is not present,
it will be approximated from the coordinates of 'Oz'). None (the
default) is equivalent to 'auto' when enough extra digitization points
are available, and (0, 0, 0, 0.095) otherwise. Currently the head radius
does not affect plotting.
New in version 0.20.
Changed in version 1.1: Added 'eeglab' option.
matplotlib.figure.FigureThe figure containing the topography.