matplotlib 3.5.1

NotesParametersBackRef
xkcd(scale=1, length=100, randomness=2)

For best results, the "Humor Sans" font should be installed: it is not included with Matplotlib.

Notes

This function works by a number of rcParams, so it will probably override others you have set before.

If you want the effects of this function to be temporary, it can be used as a context manager, for example:

with plt.xkcd():
    # This figure will be in XKCD-style
    fig1 = plt.figure()
    # ...

# This figure will be in regular style
fig2 = plt.figure()

Parameters

scale : float, optional

The amplitude of the wiggle perpendicular to the source line.

length : float, optional

The length of the wiggle along the line.

randomness : float, optional

The scale factor by which the length is shrunken or expanded.

Turn on xkcd sketch-style drawing mode. This will only have effect on things drawn after this function is called.

Examples

See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

matplotlib.pyplot.plotting

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