matplotlib.axes.Axes.add_callback#
- Axes.add_callback(func)[source]#
Add a callback function that will be called whenever one of the
Artist's properties changes.- Parameters:
- funccallable
The callback function. It must have the signature:
deffunc(artist:Artist)->Any
whereartist is the calling
Artist. Return values may existbut are ignored.
- Returns:
- int
The observer id associated with the callback. This id can beused for removing the callback with
remove_callbacklater.
See also
On this page