Octave graphic add-on, Octplot



česky

1.7 Pseudo-picture - function pcolor



Function file: h = pcolor(x,y,z)


This function plots pseudo-color picture, parameters x and y are optional. If isn't x and y enter, it compute automatically from columns/rows of matrix z. If x and y are vectors, then surface points z(i,j) are plots on posinition x(j), y(i); if x and y are matrixes it plots on position (x(i,j), y(i,j)).


Examples:
[x,y]=meshgrid(0:1:5,0:1:5);
z=[0 1 2 3 4 5;0 1 2 3 4 5;0 1 2 3 4 5;5 4 3 2 1 0;5 4 3 2 1 0;5 4 3 2 1 0];
z=[0 2.1 1.5 2.3 4.1;1.5 4.1 2.6 3.5 1.9] ;
pcolor(x,y,z)




[x,y]=meshgrid(-3:.1:3, -3:.1:3);
z = x.*exp(-x.^2 - y.^2);
pcolor(x,y,z)





<<< 1.6 Patch and surface graphs 1.8 Function specgram >>>

© 2008 David Prokop