scisalt.matplotlib.RectangleSelector¶
-
class
scisalt.matplotlib.RectangleSelector(ax, *args, selfunc=None, parent=None, verbose=False, **kwargs)[source]¶ Add rectangle selection to an already-existing axis. *args and **kwargs pass through to
matplotlib.widgets.RectangleSelector.Use key A or a to toggle whether the rectangle is active or not.
verbose controls whether selections are printed to the terminal.
New in version 1.2.
Parameters: ax :
matplotlib.axis.AxisThe axis to plot to.
args :
Passed on to
matplotlib.widgets.RectangleSelector.selfunc : function, optional
A function to be executed on rectangle selection.
parent : object, optional
Stores the parent object.
verbose : bool, optional
Determines whether verbose output is used.
kwargs :
Passed on to
matplotlib.widgets.RectangleSelector.Attributes
RectangleSelectorThe instance of matplotlib.widgets.RectangleSelector.axThe axis used. eclickThe starting mouse click from RectangleSelector.ereleaseThe ending mouse click from RectangleSelector.heightHeight of rectangle. parentThe parent object. selfuncA placeholder for the function called on each mouse release. selfunc_resultsThe results of selfunc(instance)where instance is this class.verboseDetermines whether rectangle coordinates are printed to the terminal on selection. widthWidth of rectangle. x0Minimum x coordinate of rectangle. x1Maximum x coordinate of rectangle. xsliceA list [x0, x1]. y0Minimum y coordinate of rectangle. y1Maximum y coordinate of rectangle. ysliceA list [y0, y1].