fix(plot): a crosshair readout quotes a sample, never a value between two
The readout's y was a linear interpolation between the two samples adjacent to the pointer, which answers "what is the signal at this instant" -- a number the series does not contain. On a source whose samples are already averaged or decimated at ingest that is a value nothing measured, and at a zoom past the sample spacing it is visibly not the datum under the pointer. `crosshair_span()`'s `t` becomes a selector rather than a blend factor: the nearer end wins, a tie reading the earlier sample (the bias the span already takes for a degenerate pair). `t` is measured on the samples' own x through `neighbours()`/`x_at()`, so "nearer" is exact on a non-uniform clock too, and the lookup still reads level 0, so the value is a stored sample and never an LOD bucket's aggregate. `crosshair_interpolate()` had no other caller and is gone. `CrosshairRow::marker` is placed from the same y, so the dot follows the reported sample: past the sample spacing it sits beside the polyline rather than on it, deliberately -- one y feeding both keeps the mark and the number from ever disagreeing. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
26a7c82a80
commit
c028f48fa0
10 files changed
+150
-105
No files matched your search
@@ -47,7 +47,7 @@ run touched a GPU, so read it as an upper bound and a record of the software pat
|
||||
- cursors in both orientations — vertical markers and horizontal rulers;
|
||||
- draggable regions and measurement bands with exact interval statistics;
|
||||
- a signal legend anchored to an axes corner;
|
||||
- a hover crosshair with a per-signal, interpolated readout;
|
||||
- a hover crosshair with a per-signal readout of the nearest sample's value;
|
||||
- a multi-plot `Figure` of stacked rows sharing one synchronised x axis;
|
||||
- live follow (`XFollow::Live`) with relative (multiplicative) zoom and mouse panning;
|
||||
- XY series for irregularly sampled data (`plot/data/xy_series.hpp`): sorted-ascending x
|
||||
|
||||
Reference in new issue
Block a user