Documentation

我们为许可用户提供了部分翻译好的中文文档。您只需登录便可查阅这些文档

triplot

2-D triangular plot

    Note:   The behavior of h = triplot(...) has changed. The new behavior returns a single chart line handle.

Syntax

triplot(TRI,x,y)
triplot(TRI,x,y,color)
triplot(TR)
h = triplot(...)
triplot(...,'param','value','param','value'...)

Description

triplot(TRI,x,y) displays the triangles defined in the m-by-3 matrix TRI. A row of TRI contains indices into the vectors x and y that define a single triangle. The default line color is blue.

triplot(TRI,x,y,color) uses the string color as the line color. color can also be a line specification. See ColorSpec for a list of valid color strings. See LineSpec for information about line specifications.

triplot(TR) displays the triangles in a triangulation representation.

h = triplot(...) returns a single chart line handle to the displayed triangles.

triplot(...,'param','value','param','value'...) allows additional line property name/property value pairs to be used when creating the plot. See Chart Line Properties for information about the available properties.

Examples

collapse all

Plot Delaunay Triangulation

Plot a Delaunay triangulation for 10 randomly generated points.

P = gallery('uniformdata',10,2,2);
DT = delaunayTriangulation(P);
triplot(DT)

Introduced before R2006a

Was this topic helpful?