mne.viz.eyetracking.plot_gaze#
- mne.viz.eyetracking.plot_gaze(epochs, *, calibration=None, width=None, height=None, sigma=25, cmap=None, alpha=1.0, vlim=(None, None), axes=None, show=True)[source]#
Plot a heatmap of eyetracking gaze data.
- Parameters:
- epochsinstance of
Epochs
The
Epochs
object containing eyegaze channels.- calibrationinstance of
Calibration
|None
An instance of Calibration with information about the screen size, distance, and resolution. If
None
, you must provide a width and height.- width
int
The width dimension of the plot canvas, only valid if eyegaze data are in pixels. For example, if the participant screen resolution was 1920x1080, then the width should be 1920.
- height
int
The height dimension of the plot canvas, only valid if eyegaze data are in pixels. For example, if the participant screen resolution was 1920x1080, then the height should be 1080.
- sigma
float
|None
The amount of Gaussian smoothing applied to the heatmap data (standard deviation in pixels). If
None
, no smoothing is applied. Default is 25.- cmapmatplotlib colormap |
str
|None
The
Colormap
to use. If astr
, must be a valid Matplotlib colormap name. Default isNone
, which will use the Matplotlib default colormap.- alpha
float
The opacity of the heatmap (default is 1).
- vlim
tuple
of length 2 Lower and upper bounds of the colormap, typically a numeric value in the same units as the data. If both entries are
None
, the bounds are set at(min(data), max(data))
. ProvidingNone
for just one entry will set the corresponding boundary at the min/max of the data. Defaults to(None, None)
.- axesinstance of
Axes
|None
The axes to plot into. If
None
, a newFigure
will be created. Default isNone
.- showbool
Show the figure if
True
.
- epochsinstance of
- Returns:
- figinstance of
Figure
The resulting figure object for the heatmap plot.
- figinstance of
Notes
New in v1.6.
Examples using mne.viz.eyetracking.plot_gaze
#
Working with eye tracker data in MNE-Python
Plotting eye-tracking heatmaps in MNE-Python