anyplotlib.CrosshairWidget#

class anyplotlib.CrosshairWidget(push_fn, *, cx, cy, color='#00e5ff')[source]#

Bases: Widget

Draggable crosshair overlay widget for 2-D plots.

Parameters:
  • push_fn (Callable) – Update callback.

  • cx (float) – Center position in pixel/data coordinates.

  • cy (float) – Center position in pixel/data coordinates.

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