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
| 580 | |
| 581 | @_docstring.interpd |
| 582 | class 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 |
searching dependent graphs…