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

Skip to content

Commit 39b5c7b

Browse files
committed
Merge pull request #1494 from ianthomas23/sphinx_triangulation
Added sphinx documentation for Triangulation
2 parents b4d4e71 + a9689e6 commit 39b5c7b

File tree

6 files changed

+16
-28
lines changed

6 files changed

+16
-28
lines changed

doc/api/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,6 @@
4040
spines_api.rst
4141
ticker_api.rst
4242
tight_layout_api.rst
43+
tri_api.rst
4344
units_api.rst
4445
widgets_api.rst

doc/api/tri_api.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
****************
2+
triangular grids
3+
****************
4+
5+
:mod:`matplotlib.tri`
6+
=====================
7+
8+
.. automodule:: matplotlib.tri
9+
:members: Triangulation
10+

lib/matplotlib/tri/triangulation.py

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -37,27 +37,6 @@ class Triangulation(object):
3737
triangles[i,(j+1)%3].
3838
"""
3939
def __init__(self, x, y, triangles=None, mask=None):
40-
"""
41-
Create a Triangulation object.
42-
43-
The first two arguments must be:
44-
45-
*x*, *y*: arrays of shape (npoints).
46-
Point coordinates.
47-
48-
Optional arguments (args or keyword args):
49-
50-
*triangles*: integer array of shape (ntri,3).
51-
For each triangle, the indices of the three points that make
52-
up the triangle. If the points are ordered in a clockwise
53-
manner, they are converted to anticlockwise.
54-
55-
If not specified, matplotlib.delaunay is used to create a
56-
Delaunay triangulation of the points.
57-
58-
*mask*: optional boolean array of shape (ntri).
59-
Which triangles are masked out.
60-
"""
6140
self.x = np.asarray(x, dtype=np.float64)
6241
self.y = np.asarray(y, dtype=np.float64)
6342
if self.x.shape != self.y.shape or len(self.x.shape) != 1:
@@ -106,10 +85,8 @@ def edges(self):
10685
return self._edges
10786

10887
def get_cpp_triangulation(self):
109-
"""
110-
Return the underlying C++ Triangulation object, creating it
111-
if necessary.
112-
"""
88+
# Return the underlying C++ Triangulation object, creating it
89+
# if necessary.
11390
if self._cpp_triangulation is None:
11491
self._cpp_triangulation = _tri.Triangulation(
11592
self.x, self.y, self.triangles, self.mask, self._edges,

lib/matplotlib/tri/tricontour.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def _contour_args(self, args, kwargs):
102102
103103
tricontour(triangulation, ...)
104104
105-
where triangulation is a :class:`~matplotlib.tri.Triangulation`
105+
where triangulation is a :class:`matplotlib.tri.Triangulation`
106106
object, or
107107
108108
::

lib/matplotlib/tri/tripcolor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def tripcolor(ax, *args, **kwargs):
1212
1313
tripcolor(triangulation, ...)
1414
15-
where triangulation is a :class:`~matplotlib.tri.Triangulation`
15+
where triangulation is a :class:`matplotlib.tri.Triangulation`
1616
object, or
1717
1818
::

lib/matplotlib/tri/triplot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def triplot(ax, *args, **kwargs):
1414
1515
triplot(triangulation, ...)
1616
17-
where triangulation is a :class:`~matplotlib.tri.Triangulation`
17+
where triangulation is a :class:`matplotlib.tri.Triangulation`
1818
object, or
1919
2020
::

0 commit comments

Comments
 (0)