matplotlib 3.5.1

ParametersBackRef

The selected path can be used in conjunction with ~matplotlib.path.Path.contains_point to select data points from an image.

Unlike LassoSelector , this must be initialized with a starting point xy, and the Lasso events are destroyed upon release.

Parameters

ax : `~matplotlib.axes.Axes`

The parent axes for the widget.

xy : (float, float)

Coordinates of the start of the lasso.

useblit : bool, default: True

Whether to use blitting for faster drawing (if supported by the backend).

callback : callable

Whenever the lasso is released, the callback function is called and passed the vertices of the selected path.

Selection curve of an arbitrary shape.

Examples

See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

matplotlib.widgets.LassoSelector matplotlib.widgets.Lasso

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /matplotlib/widgets.py#3619
type: <class 'type'>
Commit: