You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
X axis ticks misaligned with the grid after loading or refreshing a signal #457
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
Open sigima/data/tests/curve_formats/step.npy (from the Sigima test data) in the Signal Panel.
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).
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
SignalPlotHandler.refresh_plot replaces the scale draw of the bottom axis with a new QwtScaleDraw on every refresh (loading, selection change...), even when the X axis was not in date/time mode, to undo the date/time formatting.
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
PierreRaybaut commentedon Oct 29, 2026
Fixed by #458 (merged into develop as ca8fdea). The root cause in PythonQwt is fixed by PlotPyStack/PythonQwt#114 (PlotPyStack/PythonQwt#113).