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

Skip to content

Commit a931485

Browse files
authored
Merge pull request #20924 from dpoznik/improve-path-docs
Improve `path.py` docstrings a bit
2 parents 1a363bc + bd62a72 commit a931485

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

lib/matplotlib/path.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ class Path:
2929
The underlying storage is made up of two parallel numpy arrays:
3030
3131
- *vertices*: an Nx2 float array of vertices
32-
- *codes*: an N-length uint8 array of vertex types, or None
32+
- *codes*: an N-length uint8 array of path codes, or None
3333
3434
These two arrays always have the same length in the first
3535
dimension. For example, to represent a cubic curve, you must
36-
provide three vertices as well as three codes ``CURVE4``.
36+
provide three vertices and three ``CURVE4`` codes.
3737
3838
The code types are:
3939
@@ -109,7 +109,7 @@ def __init__(self, vertices, codes=None, _interpolation_steps=1,
109109
handled correctly by the Agg PathIterator and other consumers of
110110
path data, such as :meth:`iter_segments`.
111111
codes : array-like or None, optional
112-
n-length array integers representing the codes of the path.
112+
N-length array of integers representing the codes of the path.
113113
If not None, codes must be the same length as vertices.
114114
If None, *vertices* will be treated as a series of line segments.
115115
_interpolation_steps : int, optional
@@ -288,7 +288,7 @@ def make_compound_path_from_polys(cls, XY):
288288
Make a compound path object to draw a number
289289
of polygons with equal numbers of sides XY is a (numpolys x
290290
numsides x 2) numpy array of vertices. Return object is a
291-
:class:`Path`
291+
:class:`Path`.
292292
293293
.. plot:: gallery/misc/histogram_path.py
294294
@@ -314,8 +314,8 @@ def make_compound_path_from_polys(cls, XY):
314314
@classmethod
315315
def make_compound_path(cls, *args):
316316
"""
317-
Make a compound path from a list of Path objects. Blindly removes all
318-
Path.STOP control points.
317+
Make a compound path from a list of `Path` objects. Blindly removes
318+
all `Path.STOP` control points.
319319
"""
320320
# Handle an empty list in args (i.e. no args).
321321
if not args:
@@ -917,8 +917,8 @@ def unit_circle_righthalf(cls):
917917
@classmethod
918918
def arc(cls, theta1, theta2, n=None, is_wedge=False):
919919
"""
920-
Return the unit circle arc from angles *theta1* to *theta2* (in
921-
degrees).
920+
Return a `Path` for the unit circle arc from angles *theta1* to
921+
*theta2* (in degrees).
922922
923923
*theta2* is unwrapped to produce the shortest arc within 360 degrees.
924924
That is, if *theta2* > *theta1* + 360, the arc will be from *theta1* to
@@ -996,8 +996,8 @@ def arc(cls, theta1, theta2, n=None, is_wedge=False):
996996
@classmethod
997997
def wedge(cls, theta1, theta2, n=None):
998998
"""
999-
Return the unit circle wedge from angles *theta1* to *theta2* (in
1000-
degrees).
999+
Return a `Path` for the unit circle wedge from angles *theta1* to
1000+
*theta2* (in degrees).
10011001
10021002
*theta2* is unwrapped to produce the shortest wedge within 360 degrees.
10031003
That is, if *theta2* > *theta1* + 360, the wedge will be from *theta1*

0 commit comments

Comments
 (0)