Skip to content

eyetracking calibration plot: better axis limits? #13538

Open

Description

@drammock

looking at https://mne.tools/dev/auto_tutorials/preprocessing/90_eyetracking_data.html, I was surprised at how close to the plot edges the fixations are in the calibration plot, until I noticed that the the x and y axis limits don't go all the way to zero. It might be better / less confusing if the axis limits were fixed to the dimensions of the display that was used for the calibration. @scott-huberty WDYT?

Activity

  1. flying-spagetti commented on Dec 22, 2025

    @flying-spagetti
    Contributor

    Hi @scott-huberty,
    I looked into this and agree that using the screen resolution (when available) makes the calibration plot much easier to interpret relative to the display dimensions.

    It seems the current implementation defaults to tight axis limits around the data points if explicit limits aren't set. I tested a fix locally that checks for calibration [screen_resolution] and uses it to set xlim and ylim accordingly.

    Verification Since the sample data in eyelink.data_path() lacks resolution metadata (it returns None), I manually injected a (1920, 1080) resolution to test the logic.

    Before: (Current Implementation)

    Image

    After ( With Fix ):

    Image

    The y-axis is set to (height, 0) to match standard screen coordinate systems. If this looks good to you, I can open a PR for this!

  2. scott-huberty commented on Dec 22, 2025

    @scott-huberty
    Contributor

    Thanks @flying-spagetti ! Based on my understanding of the issue, I agree with you and @drammock that it would be better to properly set the axis limits given that we have the screen resolution info. Your fix seems reasonable to me, feel free to open a PR and we can iterate over there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions