chaco.downsample.lttb module

chaco.downsample.lttb.largest_triangle_three_buckets(points, n_buckets)

Apply the largest triangle three buckets algorithm to data points

This function assumes that all values are finite and the index values are monotone increasing.

Parameters
  • points (N, 2 array of float) – The points as a N by 2 array of floats. The index values (column 0) must be monotone increasing.

  • n_buckets (int) – The number of buckets.

Returns

index, values – The downsampled index and values.

Return type

array, array

References

Sveinn Steinarsson, “Down Sampling Time Series for Visual Representation,” Master’s Thesis, University of Iceland, 2013. http://skemman.is/handle/1946/15343