anyplotlib.PointWidget#

class anyplotlib.PointWidget(push_fn, *, x, y, color='#00e5ff', show_crosshair=True, linewidth=2)[source]#

Bases: Widget

Draggable point (control point) overlay widget for 1-D plots.

A free-moving handle that can be dragged to any position within the plot area. Reports its data-space x and y coordinates back to Python via the standard callback hooks.

Parameters:
  • push_fn (Callable) – Update callback.

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

  • y (float) – Initial y position in data coordinates (value axis).

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

  • show_crosshair (bool, optional) – If True (default), draw dashed crosshair guide lines through the handle. Set to False for a bare draggable dot with no guides.

  • linewidth (float, optional) – Guide-line stroke width in px. Default 2.