Skip to content

MinMaxDecimator class

Bases: Decimator

A decimator using the MinMax algorithm.

The MinMax algorithm is an efficient algorithm that preserves the peaks within the data. It can work very well with noisy signal data where data peeks need to be highlighted.

This class can only be used with line charts.

Methods

__init__()

__init__(
    n_out: int,
    threshold: t.Optional[int] = None,
    zoom: t.Optional[bool] = True,
)

Initialize a new MinMaxDecimator.

Parameters:

Name Type Description Default

n_out

int

The maximum number of points that will be displayed after decimation.

required

threshold

Optional[int]

The minimum amount of data points before the decimation is applied.

None

zoom

Optional[bool]

set to True to reapply the decimation when zoom or re-layout events are triggered.

True