- mne.viz.plot_tfr_topomap(tfr, tmin=None, tmax=None, fmin=None, fmax=None, ch_type=None, baseline=None, mode='mean', vmin=None, vmax=None, cmap=None, sensors=True, colorbar=True, unit=None, res=64, size=2, cbar_fmt='%1.1e', show_names=False, title=None, axes=None, show=True, outlines='head', contours=6, sphere=None)¶
Plot topographic maps of specific time-frequency intervals of TFR data.
The AverageTFR object.
The first time instant to display. If None the first time point available is used.
The last time instant to display. If None the last time point available is used.
The first frequency to display. If None the first frequency available is used.
The last frequency to display. If None the last frequency available is used.
- ch_type‘mag’ | ‘grad’ | ‘planar1’ | ‘planar2’ | ‘eeg’ |
The 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.
listof length 2
The 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.
- mode‘mean’ | ‘ratio’ | ‘logratio’ | ‘percent’ | ‘zscore’ | ‘zlogratio’ |
Perform 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.
The value specifying the lower bound of the color range. If None, and vmax is None, -vmax is used. Else np.min(data) or in case data contains only positive values 0. If callable, the output equals vmin(data). Defaults to None.
The value specifying the upper bound of the color range. If None, the maximum value is used. If callable, the output equals vmax(data). Defaults to None.
- cmapmatplotlib colormap | (colormap, bool) | ‘interactive’ |
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 (default), ‘Reds’ is used for all positive data, otherwise defaults to ‘RdBu_r’. If ‘interactive’, translates to (None, True).
- sensorsbool |
Add 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.
The unit of the channel type used for colorbar labels.
The resolution of the topomap image (n pixels along each side).
Side length per topomap in inches (only applies when plotting multiple topomaps at a time).
String format for colorbar values.
- show_namesbool |
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
maskis not None, only significant sensors will be shown.
Plot title. If None (default), no title is displayed.
- axesinstance of
The axes to plot to. If None the axes is defined automatically.
Show figure if True.
- outlines‘head’ | ‘skirt’ |
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’.
The 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 |
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.
The figure containing the topography.