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.

widthint

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.

heightint

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.

sigmafloat | 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 a str, must be a valid Matplotlib colormap name. Default is None, which will use the Matplotlib default colormap.

alphafloat

The opacity of the heatmap (default is 1).

vlimtuple 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)). Providing None 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 new Figure will be created. Default is None.

showbool

Show the figure if True.

Returns:
figinstance of Figure

The resulting figure object for the heatmap plot.

Notes

New in v1.6.

Examples using mne.viz.eyetracking.plot_gaze#

Working with eye tracker data in MNE-Python

Working with eye tracker data in MNE-Python

Plotting eye-tracking heatmaps in MNE-Python

Plotting eye-tracking heatmaps in MNE-Python