fastplotlib.LinearSelectorยถ
- class LinearSelector(selection, limits, axis='x', parent=None, end_points=None, arrow_keys_modifier='Shift', thickness=2.5, color='w', name=None)[source]ยถ
Create a horizontal or vertical line slider that is synced to an ipywidget IntSlider
- Parameters:
selection (int) โ initial x or y selected position for the slider, in world space
limits ((int, int)) โ (min, max) limits along the x or y axis for the selector, in world space
axis (str, default "x") โ โxโ | โyโ, the axis which the slider can move along
parent (Graphic) โ parent graphic for this LineSelector
end_points ((int, int)) โ set length of slider by bounding it between two x-pos or two y-pos
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
. Double click on the selector first to enable the arrow key movements, or set the attributearrow_key_events_enabled = True
thickness (float, default 2.5) โ thickness of the slider
color (Any, default "w") โ selection to set the color of the slider
name (str, optional) โ name of line slider
Features
- selection:
LinearSelectionFeature
selection()
returns the current selector position in world coordinates. Useget_selected_index()
to get the currently selected index in data space. Useselection.add_event_handler()
to add callback functions that are called when the LinearSelector selection changes. See feature class for event pick_info table