RDP class
Bases: Decimator
A decimator using the RDP algorithm.
The RDP algorithm reduces a shape made of line segments into a similar shape with less points. This algorithm should be used if the final visual representation is prioritized over the performance of the application.
This class can only be used with line charts.
Methods¶
__init__() ¶
__init__(
epsilon: t.Optional[int] = None,
n_out: t.Optional[int] = None,
threshold: t.Optional[int] = None,
zoom: t.Optional[bool] = True,
)
Initialize a new RDP
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
epsilon |
Optional[int]
|
The epsilon value for the RDP algorithm. If this value is being used, the n_out argument is ignored. |
None
|
n_out |
Optional(int
|
The maximum number of points that are displayed after
decimation. This value is ignored if the epsilon value is used. |
None
|
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
|