matplotlib 3.5.1

Parameters
rc_context(rc=None, fname=None)

Parameters

rc : dict

The rcParams to temporarily set.

fname : str or path-like

A file with Matplotlib rc settings. If both fname and rc are given, settings from rc take precedence.

Return a context manager for temporarily changing rcParams.

See Also

customizing-with-matplotlibrc-files

ref

Examples

with mpl.rc_context({'interactive': False}):

fig, ax = plt.subplots() ax.plot(range(3), range(3)) fig.savefig('example.png') plt.close(fig)

with mpl.rc_context(fname='print.rc'):

plt.plot(x, y) # uses 'print.rc'

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/pyplot.py#558
type: <class 'function'>
Commit: