8000 Slight improvements to contour.py doc by dstansby · Pull Request #10172 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Slight improvements to contour.py doc #10172

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 5, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 33 additions & 32 deletions lib/matplotlib/contour.py
< 8000 td id="diff-b3f136a845ae5b7383fbc2be280c64af12352a6583ace9658cc4f6e2479df4a3L772" data-line-number="772" class="blob-num blob-num-deletion js-linkable-line-number">
Original file line number Diff line number Diff line change
Expand Up @@ -727,25 +727,26 @@ class ContourSet(cm.ScalarMappable, ContourLabeler):

User-callable method: clabel

Useful attributes:
ax:
The axes object in which the contours are drawn
Attributes
----------
ax:
The axes object in which the contours are drawn.

collections:
a silent_list of LineCollections or PolyCollections
collections:
A silent_list of LineCollections or PolyCollections.

levels:
contour levels
levels:
Contour levels.

layers:
same as levels for line contours; half-way between
layers:
Same as levels for line contours; half-way between
levels for filled contours. See :meth:`_process_colors`.
"""

def __init__(self, ax, *args, **kwargs):
"""
Draw contour lines or filled regions, depending on
whether keyword arg 'filled' is *False* (default) or *True*.
whether keyword arg *filled* is ``False`` (default) or ``True``.

The first three arguments must be:

Expand All @@ -758,26 +759,25 @@ def __init__(self, ax, *args, **kwargs):
*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``.

level0segs = [polygon0, polygon1, ...]
filled contour regions ``len(allsegs) = len(levels)-1``. The lists
should look like::

polygon0 = array_like [[x0,y0], [x1,y1], ...]
level0segs = [polygon0, polygon1, ...]
polygon0 = array_like [[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-
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).

level0kinds = [polygon0kinds, ...]

polygon0kinds = [vertexcode0, vertexcode1, ...]
If not ``None``, ``len(allkinds) == len(allsegs)``. The lists
should look like::

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

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

Keyword arguments are as described in
:attr:`matplotlib.contour.QuadContourSet.contour_doc`.
Expand Down Expand Up @@ -1369,19 +1369,20 @@ class QuadContourSet(ContourSet):

User-callable method: :meth:`clabel`

Useful attributes:
ax:
The axes object in which the contours are drawn
Attributes
----------
ax:
The axes object in which the contours are drawn.

collections:
A silent_list of LineCollections or PolyCollections
collections:
A silent_list of LineCollections or PolyCollections.

levels:
Contour levels
levels:
Contour levels.

layers:
layers:
Same as levels for line contours; half-way between
levels for filled contours. See :meth:`_process_colors` method.
levels for filled contours. See :meth:`_process_colors` method.
"""

def _process_args(self, *args, **kwargs):
Expand Down
0