Expand description
Downsampling algorithms for large datasets.
When plotting millions of data points, rendering every single point is wasteful: a typical screen has at most a few thousand horizontal pixels, so most points overlap and contribute nothing to the visual output. Decimation reduces the point count to a manageable size while preserving the perceived shape of the data.
Two algorithms are provided:
- LTTB (Largest Triangle Three Buckets) — the gold standard for perceptually faithful line downsampling. Based on the 2013 paper by Sveinn Steinarsson.
- MinMax — a faster alternative that keeps the min and max y-value in each bucket, ensuring peaks and troughs are never lost.
Enums§
- Decimate
Method - The decimation strategy to apply when rendering a line.