mne.viz.ui_events.subscribe#

mne.viz.ui_events.subscribe(fig, event_name, callback, *, verbose=None)[source]#

Subscribe to an event on a figure’s event channel.

Parameters:
figmatplotlib.figure.Figure | Figure3D

The figure of which event channel to subscribe.

event_namestr

The name of the event to listen for.

callbackcallable()

The function that should be called whenever the event is published.

verbosebool | str | int | None

Control verbosity of the logging output. If None, use the default verbosity level. See the logging documentation and mne.verbose() for details. Should only be passed as a keyword argument.

Examples using mne.viz.ui_events.subscribe#

Using the event system to link figures

Using the event system to link figures