fastplotlib.RectangleSelector#
- class RectangleSelector(selection, limits, parent=None, resizable=True, fill_color=(0, 0, 0.35), edge_color=(0.8, 0.6, 0), edge_thickness=8, vertex_color=(0.7, 0.4, 0), vertex_thickness=8, arrow_keys_modifier='Shift', name=None)[source]#
Create a RectangleSelector graphic which can be used to select a rectangular region of data. Allows sub-selecting data from a
Graphic
or from multiple Graphics.- Parameters:
selection ((float, float, float, float)) – the initial selection of the rectangle,
(x_min, x_max, y_min, y_max)
limits ((float, float, float, float)) – limits of the selector,
(x_min, x_max, y_min, y_max)
parent (Graphic, default
None
) – associate this selector with a parent Graphicresizable (bool, default
True
) – ifTrue
, the edges can be dragged to resize the selectionfill_color (str, array, or tuple) – fill color for the selector, passed to pygfx.Color
edge_color (str, array, or tuple) – edge color for the selector, passed to pygfx.Color
edge_thickness (float, default 8) – edge thickness
arrow_keys_modifier (str) – modifier key that must be pressed to initiate movement using arrow keys, must be one of: “Control”, “Shift”, “Alt” or
None
name (str) – name for this selector graphic