Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 498f6e1

Browse files
committed
Slight improvements to contour.py doc
1 parent 58ddc36 commit 498f6e1

File tree

1 file changed

+32
-31
lines changed

1 file changed

+32
-31
lines changed

lib/matplotlib/contour.py

Lines changed: 32 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -727,25 +727,26 @@ class ContourSet(cm.ScalarMappable, ContourLabeler):
727727
728728
User-callable method: clabel
729729
730-
Useful attributes:
731-
ax:
732-
The axes object in which the contours are drawn
730+
Attributes
731+
----------
732+
ax:
733+
The axes object in which the contours are drawn.
733734
734-
collections:
735-
a silent_list of LineCollections or PolyCollections
735+
collections:
736+
A silent_list of LineCollections or PolyCollections.
736737
737-
levels:
738-
contour levels
738+
levels:
739+
Contour levels.
739740
740-
layers:
741-
same as levels for line contours; half-way between
741+
layers:
742+
Same as levels for line contours; half-way between
742743
levels for filled contours. See :meth:`_process_colors`.
743744
"""
744745

745746
def __init__(self, ax, *args, **kwargs):
746747
"""
747748
Draw contour lines or filled regions, depending on
748-
whether keyword arg 'filled' is *False* (default) or *True*.
749+
whether keyword arg *filled* is ``False`` (default) or ``True``.
749750
750751
The first three arguments must be:
751752
@@ -758,26 +759,25 @@ def __init__(self, ax, *args, **kwargs):
758759
*allsegs*: [level0segs, level1segs, ...]
759760
List of all the polygon segments for all the *levels*.
760761
For contour lines ``len(allsegs) == len(levels)``, and for
761-
filled contour regions ``len(allsegs) = len(levels)-1``.
762-
763-
level0segs = [polygon0, polygon1, ...]
762+
filled contour regions ``len(allsegs) = len(levels)-1``. The lists
763+
should look like::
764764
765-
polygon0 = array_like [[x0,y0], [x1,y1], ...]
765+
level0segs = [polygon0, polygon1, ...]
766+
polygon0 = array_like [[x0,y0], [x1,y1], ...]
766767
767768
*allkinds*: *None* or [level0kinds, level1kinds, ...]
768769
Optional list of all the polygon vertex kinds (code types), as
769-
described and used in Path. This is used to allow multiply-
770+
described and used in Path. This is used to allow multiply-
770771
connected paths such as holes within filled polygons.
771-
If not *None*, len(allkinds) == len(allsegs).
772+
If not ``None``, ``len(allkinds) == len(allsegs)``. The lists
773+
should look like::
772774
773-
level0kinds = [polygon0kinds, ...]
775+
level0kinds = [polygon0kinds, ...]
776+
polygon0kinds = [vertexcode0, vertexcode1, ...]
774777
775-
polygon0kinds = [vertexcode0, vertexcode1, ...]
776-
777-
If *allkinds* is not *None*, usually all polygons for a particular
778+
If *allkinds* is not ``None``, usually all polygons for a particular
778779
contour level are grouped together so that
779-
780-
level0segs = [polygon0] and level0kinds = [polygon0kinds].
780+
``level0segs = [polygon0]`` and ``level0kinds = [polygon0kinds]``.
781781
782782
Keyword arguments are as described in
783783
:attr:`matplotlib.contour.QuadContourSet.contour_doc`.
@@ -1369,19 +1369,20 @@ class QuadContourSet(ContourSet):
13691369
13701370
User-callable method: :meth:`clabel`
13711371
1372-
Useful attributes:
1373-
ax:
1374-
The axes object in which the contours are drawn
1372+
Attributes
1373+
----------
1374+
ax:
1375+
The axes object in which the contours are drawn.
13751376
1376-
collections:
1377-
A silent_list of LineCollections or PolyCollections
1377+
collections:
1378+
A silent_list of LineCollections or PolyCollections.
13781379
1379-
levels:
1380-
Contour levels
1380+
levels:
1381+
Contour levels.
13811382
1382-
layers:
1383+
layers:
13831384
Same as levels for line contours; half-way between
1384-
levels for filled contours. See :meth:`_process_colors` method.
1385+
levels for filled contours. See :meth:`_process_colors` method.
13851386
"""
13861387

13871388
def _process_args(self, *args, **kwargs):

0 commit comments

Comments
 (0)