MATLAB Function Reference    

2-D triangular plot



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.

See Also

ColorSpec, delaunay, line, Line Properties, LineSpec, plot, trimesh, trisurf

  triplequad trisurf