Name

tripcolor — Pseudo color 2-D plot based on a triangulation

Calling Sequence

hdl = tripcolor(TRI,X,Y,C)

Parameter

TRI

3 by n matrix

X

1 by n matrix

Y

1 by n matrix

C

n by n matrix

hdl

Handle of the created Fac3d entity

Description

tripcolor(TRI,X,Y,C) displays the triangles defined in the 3-by-M face matrix TRI as pseudocolor patches. A row of TRI contains indexes into the X,Y vertex vectors to define a single triangular face. The color is defined by the vector C.

tripcolor(...,'param','value','param','value'...) allows additional param/value pairs to be used. See pcolor for the possible param/value pairs.

Examples

load(PLOTLIB+'tridem.dat')
subplot(2,2,1);
tripcolor(nodes,xy(1,:),xy(2,:),P(:,1)','edgecolor',[1 1 0]);
colorbar on;
axis equal;
subplot(2,2,2);
tripcolor(nodes,xy(1,:),xy(2,:),P(:,1)');
shading flat;
colorbar on;
axis equal;
subplot(2,2,3);
tripcolor(nodes,xy(1,:),xy(2,:),P(:,1)');
shading interp
colorbar on;
axis equal;   
subplot(2,2,4);
tripcolor(nodes,xy(1,:),xy(2,:),P(:,1)');
shading interp
colorbar on;
axis equal;    
caxis([0.1 0.2]);

Screenshot

See Also

plot , plot3 , pcolor , colormap , shading , caxis

Authors

Stéphane Mottelet