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
YRangeCursorTool: default LABELFUNCS show incorrect inequality and negative ∆y when cursors are inverted #55
The default LABELFUNCS of YRangeCursorTool display y0 < y < y1 and ∆y = y1 - y0 without sorting the values. When the user drags the cursors so that y0 > y1, the inequality becomes mathematically incorrect and ∆y becomes negative, which has no meaning for a range width.
To Reproduce
Create a PlotDialog with PlotType.CURVE and add a curve
Add YRangeCursorTool to the manager
Activate the Y-range cursor tool
Drag the top horizontal cursor below the bottom cursor
Observe the annotation label: y0 < y < y1 is displayed with y0 > y1, and ∆y is negative
Expected behavior
The annotation should always display values in sorted order: min(y0, y1) < y < max(y0, y1), and ∆y should always be the absolute range width (positive value), regardless of cursor drag order.
Screenshots
N/A
Additional context
The issue is in plotpy/tools/curve.py, in the YRangeCursorTool class definition:
Activity
ThomasMalletCodra commentedon May 28, 2026
Review and merge in release branch : 5f614f7