<< patch | Graphics functions | pie >> |
pcolor(C) |
pcolor(X, Y, C) |
pcolor(parent, ...) |
go = pcolor(...) |
x-coordinates: vector or matrix.
y-coordinates: vector or matrix.
Color array: m-by-n-by-3 array of RGB triplets.
a scalar graphics object value: parent container, specified as a axes.
a graphics object: surface type.
pcolor(C) creates a pseudocolor plot of the data in the matrix C, where each cell or 'face' in the plot is colored according to the corresponding value in the matrix.
The color of each face is determined by a colormap, which maps data values to colors.
X = linspace(0, 2*pi, 100);
Y = linspace(0, 2*pi, 100);
Z = sin(X' * Y);
f = figure()
pcolor(X, Y, Z)
f = figure();
rng('default');
ax1 = subplot(1, 2, 1);
C1 = rand(20, 10);
pcolor(ax1, C1)
ax2 = subplot(1, 2, 2);
C2 = rand(50, 10);
pcolor(ax2, C2)
Version | Description |
---|---|
1.0.0 | initial version |
Allan CORNET