matplotlib 3.5.1

AttributesParametersBackRef

Attributes

ax : `~matplotlib.axes.Axes`

The Axes object in which the contours are drawn.

collections : `.silent_list` of `.PathCollection`\s

The .Artist \s representing the contour. This is a list of .PathCollection \s for both line and filled contours.

levels : array

The values of the contour levels.

layers : array

Same as levels for line contours; half-way between levels for filled contours. See ContourSet._process_colors .

User-callable method: ~.Axes.clabel

Parameters

ax : `~.axes.Axes`
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 : ``None`` or [level0kinds, level1kinds, ...]

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 .

Store a set of contour lines or filled regions.

Examples

See :

Back References

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

matplotlib.contour.ContourLabeler.clabel matplotlib.pyplot.clabel matplotlib.pyplot.colorbar matplotlib.figure.FigureBase.colorbar matplotlib.contour.ContourLabeler matplotlib.axes._axes.Axes.clabel

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