mpl.tri.Triangulation¶
-
class
mpl.tri.Triangulation(x, y, triangles=None, mask=None)[source]¶ An unstructured triangular grid consisting of npoints points and ntri triangles. The triangles can either be specified by the user or automatically generated using a Delaunay triangulation.
Parameters: x, y : array_like of shape (npoints)
Coordinates of grid points.
triangles : integer array_like of shape (ntri, 3), optional
For each triangle, the indices of the three points that make up the triangle, ordered in an anticlockwise manner. If not specified, the Delaunay triangulation is calculated.
mask : boolean array_like of shape (ntri), optional
Which triangles are masked out.
Notes
For a Triangulation to be valid it must not have duplicate points, triangles formed from colinear points, or overlapping triangles.
Attributes
edges neighbors is_delaunay (bool) Whether the Triangulation is a calculated Delaunay triangulation (where triangles was not specified) or not.
Methods¶
__init__(x, y[, triangles, mask]) |
|
calculate_plane_coefficients(z) |
Calculate plane equation coefficients for all unmasked triangles from the point (x,y) coordinates and specified z-array of shape (npoints). |
get_cpp_triangulation() |
|
get_from_args_and_kwargs(*args, **kwargs) |
Return a Triangulation object from the args and kwargs, and the remaining args and kwargs with the consumed values removed. |
get_masked_triangles() |
Return an array of triangles that are not masked. |
get_trifinder() |
Return the default matplotlib.tri.TriFinder of this triangulation, creating it if necessary. |
set_mask(mask) |
Set or clear the mask array. |