Загрузка
_SelectorWidgetSelection curve of an arbitrary shape.
For the selector to remain responsive you must keep a reference to it.
The selected path can be used in conjunction with contains_point
to select data points from an image.
In contrast to Lasso, LassoSelector is written with an interface
similar to RectangleSelector and SpanSelector, and will continue to
interact with the Axes until disconnected.
Example usage:
ax = plt.subplot()
ax.plot(x, y)
def onselect(verts):
print(verts)
lasso = LassoSelector(ax, onselect)
AxesThe parent Axes for the widget.
Whenever the lasso is released, the onselect 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.
Properties with which the line is drawn, see Line2D
for valid properties. Default values are defined in mpl.rcParams.
MouseButton or list of MouseButton, optionalThe mouse buttons used for rectangle selection. Default is None,
which corresponds to all buttons.
matplotlib.widgets.LassoSelector