MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / ContourSet

Class ContourSet

lib/matplotlib/contour.py:582–1304  ·  view source on GitHub ↗

Store a set of contour lines or filled regions. User-callable method: `~.Axes.clabel` Parameters ---------- ax : `~matplotlib.axes.Axes` levels : [level0, level1, ..., leveln] A list of floating point numbers indicating the contour levels. allsegs : [level0se

Source from the content-addressed store, hash-verified

580
581@_docstring.interpd
582class ContourSet(ContourLabeler, mcoll.Collection):
583 """
584 Store a set of contour lines or filled regions.
585
586 User-callable method: `~.Axes.clabel`
587
588 Parameters
589 ----------
590 ax : `~matplotlib.axes.Axes`
591
592 levels : [level0, level1, ..., leveln]
593 A list of floating point numbers indicating the contour levels.
594
595 allsegs : [level0segs, level1segs, ...]
596 List of all the polygon segments for all the *levels*.
597 For contour lines ``len(allsegs) == len(levels)``, and for
598 filled contour regions ``len(allsegs) = len(levels)-1``. The lists
599 should look like ::
600
601 level0segs = [polygon0, polygon1, ...]
602 polygon0 = [[x0, y0], [x1, y1], ...]
603
604 allkinds : ``None`` or [level0kinds, level1kinds, ...]
605 Optional list of all the polygon vertex kinds (code types), as
606 described and used in Path. This is used to allow multiply-
607 connected paths such as holes within filled polygons.
608 If not ``None``, ``len(allkinds) == len(allsegs)``. The lists
609 should look like ::
610
611 level0kinds = [polygon0kinds, ...]
612 polygon0kinds = [vertexcode0, vertexcode1, ...]
613
614 If *allkinds* is not ``None``, usually all polygons for a
615 particular contour level are grouped together so that
616 ``level0segs = [polygon0]`` and ``level0kinds = [polygon0kinds]``.
617
618 **kwargs
619 Keyword arguments are as described in the docstring of
620 `~.Axes.contour`.
621
622 %(contour_set_attributes)s
623 """
624
625 def __init__(self, ax, *args,
626 levels=None, filled=False, linewidths=None, linestyles=None,
627 hatches=(None,), alpha=None, origin=None, extent=None,
628 cmap=None, colors=None, norm=None, vmin=None, vmax=None,
629 colorizer=None, extend='neither', antialiased=None, nchunk=0,
630 locator=None, transform=None, negative_linestyles=None,
631 **kwargs):
632 """
633 Draw contour lines or filled regions, depending on
634 whether keyword arg *filled* is ``False`` (default) or ``True``.
635
636 Call signature::
637
638 ContourSet(ax, levels, allsegs, [allkinds], **kwargs)
639

Callers 2

test_contour_manualFunction · 0.90
contour_manual.pyFile · 0.90

Calls 3

get_pathsMethod · 0.45
get_alphaMethod · 0.45

Tested by 1

test_contour_manualFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…