fastplotlib.VisibilitySelector#

class VisibilitySelector(collection, selection=None, lut=None, lut_wrap='fixed')[source]#

Shows a subset of graphics in a GraphicCollection by toggling their visibility.

selection = list() or None: all invisible. selection = [s1, s2, ..., s_n]: only these indices visible

For LineStack and ScatterStack, visible graphics are re-stacked along the stack axis when the selection changes.

If a lut is provided, each visible graphic is colored by its position in the selection

Parameters:
  • collection (GraphicCollection)

  • selection (list[int] or None) – Initial selection.

  • lut (str | np.ndarray, optional) – a color, or a stack of RGBA arrays of shape (n, 4)

  • lut_wrap ("fixed" or "repeat") – How to handle selection indices beyond the end of the lut.