From e8642bd5186be2814de56e71da9f71f00bd018f5 Mon Sep 17 00:00:00 2001 From: flying-spagetti Date: Mon, 22 Dec 2025 10:49:32 +0530 Subject: [PATCH 1/4] FIX: Set calibration plot axes to screen resolution if available --- mne/preprocessing/eyetracking/calibration.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mne/preprocessing/eyetracking/calibration.py b/mne/preprocessing/eyetracking/calibration.py index 867119557a8..d240c6dca5f 100644 --- a/mne/preprocessing/eyetracking/calibration.py +++ b/mne/preprocessing/eyetracking/calibration.py @@ -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) From 011ec399d788ac112f3dd1ae5274ba4bc05970cd Mon Sep 17 00:00:00 2001 From: flying-spagetti Date: Tue, 23 Dec 2025 16:10:42 +0530 Subject: [PATCH 2/4] DOC: Adds to contributors and document bugfix for axis limits in calibration plot --- doc/changes/dev/13558.bugfix.rst | 1 + doc/changes/names.inc | 1 + 2 files changed, 2 insertions(+) create mode 100644 doc/changes/dev/13558.bugfix.rst diff --git a/doc/changes/dev/13558.bugfix.rst b/doc/changes/dev/13558.bugfix.rst new file mode 100644 index 00000000000..16f0fce43b1 --- /dev/null +++ b/doc/changes/dev/13558.bugfix.rst @@ -0,0 +1 @@ +Fix axis limits in :func:`mne.preprocessing.eyetracking.calibration.Calibration.plot` to use screen resolution if available, by :newcontrib:`Gnaneswar Lopinti`. \ No newline at end of file diff --git a/doc/changes/names.inc b/doc/changes/names.inc index 77e665ec6ed..062d303b4dd 100644 --- a/doc/changes/names.inc +++ b/doc/changes/names.inc @@ -352,3 +352,4 @@ .. _Zhi Zhang: https://github.com/tczhangzhi/ .. _Ziyi ZENG: https://github.com/ZiyiTsang .. _Zvi Baratz: https://github.com/ZviBaratz +.. _Gnaneswar Lopinti: https://github.com/flying-spagetti From dc1c44fec4b2d7c7c1082c6e35b2c9619c085d9c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 23 Dec 2025 10:41:26 +0000 Subject: [PATCH 3/4] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- doc/changes/names.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/changes/names.inc b/doc/changes/names.inc index 062d303b4dd..ac735f5d835 100644 --- a/doc/changes/names.inc +++ b/doc/changes/names.inc @@ -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 @@ -352,4 +353,3 @@ .. _Zhi Zhang: https://github.com/tczhangzhi/ .. _Ziyi ZENG: https://github.com/ZiyiTsang .. _Zvi Baratz: https://github.com/ZviBaratz -.. _Gnaneswar Lopinti: https://github.com/flying-spagetti From e712262883d8f8b5849620d9ca9a01daecf938eb Mon Sep 17 00:00:00 2001 From: flying-spagetti Date: Tue, 23 Dec 2025 23:35:23 +0530 Subject: [PATCH 4/4] DOC: Fix the method reference and sync --- doc/changes/dev/13558.bugfix.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/changes/dev/13558.bugfix.rst b/doc/changes/dev/13558.bugfix.rst index 16f0fce43b1..820373b2e2c 100644 --- a/doc/changes/dev/13558.bugfix.rst +++ b/doc/changes/dev/13558.bugfix.rst @@ -1 +1 @@ -Fix axis limits in :func:`mne.preprocessing.eyetracking.calibration.Calibration.plot` to use screen resolution if available, by :newcontrib:`Gnaneswar Lopinti`. \ No newline at end of file +Fix axis limits in :meth:`mne.preprocessing.eyetracking.calibration.Calibration.plot` to use screen resolution if available, by :newcontrib:`Gnaneswar Lopinti`. \ No newline at end of file