matplotlib 3.5.1

Backends must implement a canvas that handles connections for 'button_press_event' and 'button_release_event'. See FigureCanvasBase.mpl_connect for more information.

They must also define

save_figure

save the current figure

draw_rubberband (optional)

draw the zoom to rect "rubberband" rectangle

set_message (optional)

display message

set_history_buttons (optional)

you can change the history back / forward buttons to indicate disabled / enabled state.

and override __init__ to set up the toolbar -- without forgetting to call the base-class init. Typically, __init__ needs to set up toolbar buttons connected to the :None:None:`home`, :None:None:`back`, :None:None:`forward`, pan , zoom , and save_figure methods and using standard icons in the "images" subdirectory of the data path.

That's it, we'll do the rest!

Base class for the navigation cursor, version 2.

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /matplotlib/backend_bases.py#2876
type: <class 'type'>
Commit: