pub fn lttb(x: &[f64], y: &[f64], threshold: usize) -> Vec<usize>Expand description
Downsamples a series of (x, y) points to threshold points using the
Largest Triangle Three Buckets algorithm.
LTTB preserves the visual shape of the line while dramatically reducing point count. A 1M-point series decimated to 1000 points is visually indistinguishable from the original at screen resolution.
Returns indices into the original arrays. The first and last points are always preserved.
ยงPanics
Panics if x.len() != y.len().