The backend-specific canvas instance.
The figure number.
The default key handler cid, when using the toolmanager. To disable the default key press handling use:
figure.canvas.mpl_disconnect( figure.canvas.manager.key_press_handler_id)
The default mouse button handler cid, when using the toolmanager. To disable the default button press handling use:
figure.canvas.mpl_disconnect( figure.canvas.manager.button_press_handler_id)
The figure manager is used by pyplot to interact with the window in a backend-independent way. It's an adapter for the real (GUI) framework that represents the visual figure on screen.
GUI backends define from this class to translate common operations such as show or resize to the GUI-specific code. Non-GUI backends do not support these operations an can just use the base class.
This following basic operations are accessible:
Window operations
Key and mouse button press handling
The figure manager sets up default key and mouse button press handling by hooking up the .key_press_handler
to the matplotlib event system. This ensures the same shortcuts and mouse actions across backends.
Other operations
Subclasses will have additional attributes and functions to access additional functionality. This is of course backend-specific. For example, most GUI backends have window
and toolbar
attributes that give access to the native GUI widgets of the respective framework.
A backend-independent abstraction of a figure container and controller.
The following pages refer to to this document either explicitly or contain code examples using this.
matplotlib.figure.Figure.show
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