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

Method __init__

lib/matplotlib/contour.py:625–812  ·  view source on GitHub ↗

Draw contour lines or filled regions, depending on whether keyword arg *filled* is ``False`` (default) or ``True``. Call signature:: ContourSet(ax, levels, allsegs, [allkinds], **kwargs) Parameters ---------- ax : `~matplotlib.axes.Axes

(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,
                 colorizer=None, extend='neither', antialiased=None, nchunk=0,
                 locator=None, transform=None, negative_linestyles=None,
                 **kwargs)

Source from the content-addressed store, hash-verified

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
640 Parameters
641 ----------
642 ax : `~matplotlib.axes.Axes`
643 The `~.axes.Axes` object to draw on.
644
645 levels : [level0, level1, ..., leveln]
646 A list of floating point numbers indicating the contour
647 levels.
648
649 allsegs : [level0segs, level1segs, ...]
650 List of all the polygon segments for all the *levels*.
651 For contour lines ``len(allsegs) == len(levels)``, and for
652 filled contour regions ``len(allsegs) = len(levels)-1``. The lists
653 should look like ::
654
655 level0segs = [polygon0, polygon1, ...]
656 polygon0 = [[x0, y0], [x1, y1], ...]
657
658 allkinds : [level0kinds, level1kinds, ...], optional
659 Optional list of all the polygon vertex kinds (code types), as
660 described and used in Path. This is used to allow multiply-
661 connected paths such as holes within filled polygons.
662 If not ``None``, ``len(allkinds) == len(allsegs)``. The lists
663 should look like ::
664
665 level0kinds = [polygon0kinds, ...]
666 polygon0kinds = [vertexcode0, vertexcode1, ...]
667
668 If *allkinds* is not ``None``, usually all polygons for a
669 particular contour level are grouped together so that
670 ``level0segs = [polygon0]`` and ``level0kinds = [polygon0kinds]``.
671
672 **kwargs
673 Keyword arguments are as described in the docstring of
674 `~.Axes.contour`.
675 """
676 if antialiased is None and filled:
677 # Eliminate artifacts; we are not stroking the boundaries.
678 antialiased = False
679 # The default for line contours will be taken from the
680 # LineCollection default, which uses :rc:`lines.antialiased`.
681 super().__init__(
682 antialiaseds=antialiased,

Callers

nothing calls this directly

Calls 15

_process_argsMethod · 0.95
_process_levelsMethod · 0.95
_process_colorsMethod · 0.95
_process_linewidthsMethod · 0.95
_process_linestylesMethod · 0.95
changedMethod · 0.95
blockedMethod · 0.80
add_collectionMethod · 0.80
set_cmapMethod · 0.45

Tested by

no test coverage detected