Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/changes/dev/13558.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix axis limits in :meth:`mne.preprocessing.eyetracking.calibration.Calibration.plot` to use screen resolution if available, by :newcontrib:`Gnaneswar Lopinti`.
1 change: 1 addition & 0 deletions doc/changes/names.inc
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
.. _Gennadiy Belonosov: https://github.com/Genuster
.. _Geoff Brookshire: https://github.com/gbrookshire
.. _George O'Neill: https://georgeoneill.github.io
.. _Gnaneswar Lopinti: https://github.com/flying-spagetti
.. _Gonzalo Reina: https://orcid.org/0000-0003-4219-2306
.. _Guillaume Dumas: https://mila.quebec/en/person/guillaume-dumas
.. _Guillaume Favelier: https://github.com/GuillaumeFavelier
Expand Down
4 changes: 4 additions & 0 deletions mne/preprocessing/eyetracking/calibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,10 @@ def plot(self, show_offsets=True, axes=None, show=True):

# Invert y-axis because the origin is in the top left corner
ax.invert_yaxis()
if self["screen_resolution"] is not None:
w, h = self["screen_resolution"]
ax.set_xlim(0, w)
ax.set_ylim(h, 0)
ax.scatter(px, py, color="gray")
ax.scatter(gaze_x, gaze_y, color="red", alpha=0.5)

Expand Down
Loading