anyplotlib.VLineWidget#

class anyplotlib.VLineWidget(push_fn, *, x, color='#00e5ff')[source]#

Bases: Widget

Draggable vertical line overlay widget for 1-D plots.

Allows interactive selection of a single x-axis value. The line can be dragged left/right to change the selected position.

Parameters:
  • push_fn (Callable) – Update callback.

  • x (float) – Initial x-position in data coordinates.

  • color (str, optional) – CSS colour for the line. Default "#00e5ff".