get_selected_indices#

RectangleSelector.get_selected_indices(graphic=None)[source]#

Returns the indices of the Graphic data bounded by the current selection.

These are the data indices which correspond to the data under the selector.

Parameters:

graphic (Graphic, default None) – If provided, returns the selection indices from this graphic instrad of the graphic set as parent

Returns:

data indicies of the selection | tuple of [row_indices, col_indices] if the graphic is an image | list of indices along the x-dimension for each line if graphic is a line collection | array of indices along the x-dimension if graphic is a line

Return type:

Union[np.ndarray, List[np.ndarray]]