feat(render): mark the samples of a window sparse enough to see them
`Style::marker_below_samples` (50 by default, `0` for never) draws a `marker_px` dot on every *raw* sample when the visible window holds at most that many, in the trace's own colour. Zoomed in far enough to see individual samples, the polyline between them stops being the shape a reader is looking at -- a handful of points across a whole panel ARE the picture -- and a dot makes each one a place rather than a bend in a line. Level 0 only: above it the geometry is pyramid buckets, which are not points anyone can find. Test: a_sparse_window_marks_its_samples -- the same flat series at ten samples and at a hundred. Ten gives exactly ten dots, evenly spaced (their centres are checked against the panel's own step, so "they are the samples" is asserted rather than "something was painted"); a hundred is past the threshold and gives none. The dots *group* into runs of columns (a marker is `marker_px` wide), which is how the test reads one marker per sample -- counting columns read three.
This commit is contained in:
1 parent
fba8d985cf
commit
7dbe4e7183
5 files changed
+121
No files matched your search
@@ -56,6 +56,8 @@ Logical metrics (scaled by `device()`):
|
||||
|---|---|---|
|
||||
| `axis_font_px` | `12.0` | logical em the axis text is drawn at |
|
||||
| `grid_label_pad` | `4.0` | gap between a tick label and the axes, and the inset inside a title strip |
|
||||
| `marker_below_samples` | `50` | a dot per raw sample when the window holds at most this many (`0` = never) |
|
||||
| `marker_px` | `3.0` | logical size of that dot |
|
||||
| `grid_major_width` | `1.0` | width of a major grid line |
|
||||
| `grid_minor_width` | `0.75` | width of a minor grid line (sub-pixel on purpose) |
|
||||
| `grid_minor_dash_on` | `3.0` | minor grid dash: ink length in logical pixels |
|
||||
|
||||
Reference in new issue
Block a user