matplotlib 3.5.1

Parameters
__init__(self, ax, *args, levels=None, filled=False, linewidths=None, linestyles=None, hatches=(None,), alpha=None, origin=None, extent=None, cmap=None, colors=None, norm=None, vmin=None, vmax=None, extend='neither', antialiased=None, nchunk=0, locator=None, transform=None, **kwargs)

Call signature:

ContourSet(ax, levels, allsegs, [allkinds], **kwargs)

Parameters

ax : `~.axes.Axes`

The :None:None:`~.axes.Axes` object to draw on.

levels : [level0, level1, ..., leveln]

A list of floating point numbers indicating the contour levels.

allsegs : [level0segs, level1segs, ...]

List of all the polygon segments for all the levels. For contour lines len(allsegs) == len(levels) , and for filled contour regions len(allsegs) = len(levels)-1 . The lists should look like :

level0segs = [polygon0, polygon1, ...]
polygon0 = [[x0, y0], [x1, y1], ...]
allkinds : [level0kinds, level1kinds, ...], optional

Optional list of all the polygon vertex kinds (code types), as described and used in Path. This is used to allow multiply- connected paths such as holes within filled polygons. If not None , len(allkinds) == len(allsegs) . The lists should look like :

level0kinds = [polygon0kinds, ...]
polygon0kinds = [vertexcode0, vertexcode1, ...]

If allkinds is not None , usually all polygons for a particular contour level are grouped together so that level0segs = [polygon0] and level0kinds = [polygon0kinds] .

**kwargs :

Keyword arguments are as described in the docstring of ~.Axes.contour .

Draw contour lines or filled regions, depending on whether keyword arg filled is False (default) or True .

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