anyplotlib.Event#

class anyplotlib.Event(event_type, source, data=<factory>)[source]#

Bases: object

A single interactive event.

Event_type:

one of on_click / on_changed / on_release / on_key / on_line_hover / on_line_click

Source:

the originating Python object (Widget, Plot, or None)

Data:

full state dict; all keys also accessible as event.x

Parameters:

For on_line_hover and on_line_click events the data dict contains:

  • line_idNone for the primary line, or the 8-char ID string assigned by Plot1D.add_line().

  • x – data-space x coordinate of the nearest point on the line.

  • y – data-space y coordinate of the nearest point on the line.

event_type: str#
source: Any#
data: dict#