Skip to content

X axis ticks misaligned with the grid after loading or refreshing a signal #457

Closed

Description

@PierreRaybaut

Description

When a signal is displayed, the vertical grid lines may not be aligned with the ticks and labels of the X axis: the curve and the grid are drawn at positions that do not match the axis graduations. The misalignment disappears as soon as the view is slightly changed (pan, zoom).

Steps to reproduce

  1. Open sigima/data/tests/curve_formats/step.npy (from the Sigima test data) in the Signal Panel.
  2. Compare the vertical grid lines with the X axis ticks: they are shifted, the gap growing towards the ends of the axis (e.g. axis drawn between 7 and 503 px, while the grid and the curve are drawn between -1 and 509 px).
  3. Pan the view slightly: the grid and the ticks are aligned again.

This happens with signals whose X axis bounds are not graduations of the axis (here, X ∈ [3.06e-7, 4.1e-7] with graduations from 3.2e-7 to 4e-7).

Root cause

Proposed fix

Replace the bottom scale draw only when it is a date/time scale draw (i.e. when leaving the date/time mode), so that the X axis keeps its scale draw, and its alignment, on regular refreshes. Combined with the PythonQwt fix, the axis stays aligned in all cases.

Activity

  1. PierreRaybaut commented on Oct 29, 2026

    @PierreRaybaut
    ContributorAuthor

    Fixed by #458 (merged into develop as ca8fdea). The root cause in PythonQwt is fixed by PlotPyStack/PythonQwt#114 (PlotPyStack/PythonQwt#113).

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions