| MATLAB Function Reference | ![]() |
triplot(TRI,x,y)
triplot(TRI,x,y,color)
h = triplot(...)
triplot(...,'param','value','param','value'...)
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.
h = triplot(...) returns a vector of handles 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 Line Properties for information about the available properties.
This code plots the Delaunay triangulation for 10 randomly generated points.
rand('state',7);
x = rand(1,10);
y = rand(1,10);
TRI = delaunay(x,y);
triplot(TRI,x,y,'red')

ColorSpec, delaunay, line, Line Properties, LineSpec, plot, trimesh, trisurf
![]() | triplequad | trisurf | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |