# org.das2.qds.util.LttbDownsampler

LTTB (Largest Triangle Three Buckets) downsampling for Autoplot QDataSet.

 Assumes:
   - yData is rank-1
   - xData is taken from DEPEND_0 if present; otherwise x = 0,1,2,...

 Returns a rank-1 DDataSet with DEPEND_0 set to a rank-1 x dataset.

***
<a name="lttb-org.das2.qds.QDataSet-int"></a>
# lttb
lttb( <a href='https://cottagesystems.com/~jbf/autoplot/doc/org/das2/qds/QDataSet.html'>QDataSet</a> yData, int threshold ) &rarr; <a href='https://cottagesystems.com/~jbf/autoplot/doc/org/das2/qds/QDataSet.html'>QDataSet</a>

Downsample a 1D QDataSet with LTTB.

### Parameters:
yData - rank-1 QDataSet of y-values
<br>threshold - desired number of points (including first and last)

### Returns:
downsampled QDataSet (rank-1) with DEPEND_0 set

<a href="https://github.com/autoplot/dev/search?q=lttb&unscoped_q=lttb">[search for examples]</a>
<a href="https://github.com/autoplot/documentation/blob/master/javadoc/index-all.md">[return to index]</a>

