add_polygon_selector#

LineCollection.add_polygon_selector(selection=None, **kwargs)[source]#

Add a PolygonSelector. Selectors are just Graphic objects, so you can manage, remove, or delete them from a plot area just like any other Graphic.

Parameters:

selection (List of positions, optional) – Initial points for the polygon. If not given or None, you’ll start drawing the selection (clicking adds points to the polygon).

Return type:

PolygonSelector

Examples#

Polygon Selectors

Polygon Selectors