get_selected_data#
- RectangleSelector.get_selected_data(graphic=None, mode='full')[source]#
Get the
Graphic
data bounded by the current selection. Returns a view of the data array.If the
Graphic
is a collection, such as aLineStack
, it returns a list of views of the full array. Can be performed on theparent
Graphic or on another graphic by passing to thegraphic
arg.- Parameters:
graphic (Graphic, optional, default
None
) – if provided, returns the data selection from this graphic instead of the graphic set asparent
mode (str, default 'full') – One of ‘full’, ‘partial’, or ‘ignore’. Indicates how selected data should be returned based on the selectors position over the graphic. Only used for
LineGraphic
,LineCollection
, andLineStack
| If ‘full’, will return all data bounded by the x and y limits of the selector even if partial indices along one axis are not fully covered by the selector. | If ‘partial’ will return only the data that is bounded by the selector, missing indices not bounded by the selector will be set to NaNs | If ‘ignore’, will only return data for graphics that have indices completely bounded by the selector
- Returns:
view or list of views of the full array, returns empty array if selection is empty
- Return type:
np.ndarray or List[np.ndarray]