Skip to content

sampling_vertex_vw

sampling_vertex_vw(
    n: int, polygon: bool | None = None
) -> FeatureSpec

lets_plot's Visvalingam-Whyatt path simplification. Not applied by ggrust.

Built as lets_plot builds it, so ported code runs; rendering warns (GgrustWarning) and draws every vertex.

Parameters:

  • n (int) –

    Number of vertices to keep.

  • polygon (bool, default: None ) –

    Whether the paths are polygon rings.

Returns:

  • FeatureSpec –

    The lets_plot spec.

Examples:

>>> from ggrust import *
>>> sampling_vertex_vw(500).as_dict()
{'name': 'vertex_vw', 'n': 500}