matplotlib 3.5.1

Parameters
_get_output_canvas(self, backend, fmt)

Parameters

backend : str or None

If not None, switch the figure canvas to the FigureCanvas class of the given backend.

fmt : str

If backend is None, then determine a suitable canvas class for saving to format fmt -- either the current canvas class, if it supports fmt, or whatever get_registered_canvas_class returns; switch the figure canvas to that canvas class.

Set the canvas in preparation for saving the figure.

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#2156
type: <class 'function'>
Commit: