matplotlib.widgets.Lasso
- class matplotlib.widgets.Lasso(ax, xy, callback, *, useblit=True, props=None)
Bases:
AxesWidget
Bases: AxesWidget
Selection curve of an arbitrary shape.
The selected path can be used in conjunction with
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.
AxesThe parent Axes for the widget.
Coordinates of the start of the lasso.
Whenever the lasso is released, the callback function is called and passed the vertices of the selected path.
Whether to use blitting for faster drawing (if supported by the backend). See the tutorial Faster rendering by using blitting for details.
Lasso line properties. See Line2D for valid properties.
Default props are:
{'linestyle' : '-', 'color' : 'black', 'lw' : 2}
matplotlib.widgets.Lasso