* b2 B" V) n- P gpcolor(C) draws a pseudocolor plot. The elements of C are linearly mapped to an index into the current colormap. The mapping from C to the current colormap is defined by colormap and caxis. " x$ B0 g# u. e( ?/ [4 }% o1 P7 ^1 n8 B, j# I6 g! }% z
pcolor(X,Y,C) draws a pseudocolor plot of the elements of C at the locations specified by X and Y. The plot is a logically rectangular, two-dimensional grid with vertices at the points [X(i,j), Y(i,j)]. X and Y are vectors or matrices that specify the spacing of the grid lines. If X and Y are vectors, X corresponds to the columns of C and Y corresponds to the rows. If X and Y are matrices, they must be the same size as C. " o" v* v5 |8 W- _' ?! d
$ W" y# T7 ~( I; J3 y# W$ g
pcolor(axes_handles,...) plots into the axes with handle axes_handle instead of the current axes (gca).2 {% v8 X7 k* W% e) Z) I$ w" \
我试着翻译一下,如下:+ g e5 g. A6 [4 w1 v4 f. y! t
pcolor(C)画出一个伪彩色图。C的元素线性地对应到当前的颜色分配表中。这从C到当前颜色分配表的对应是由颜色分配表和指定坐标轴的颜色定义的。& y& u9 F9 r P8 L% d/ B
pcolor(X,Y,C)画出一个伪彩色图,其元素的位置由X,Y来决定。这个图形在逻辑上是矩形的, 以[X(i,j), Y(i,j)]为顶点的二维格子。X,Y是说明格子线分配的向量或者矩阵。如果X,Y是向量,X对应C的列,Y对应行。如果X,Y都是矩阵,他们必须与C同型。; D2 J6 A, I! p! U. F5 Q6 V& J
pcolor(axes_handles,...) 用句柄axes_handle代替当前坐标轴来画图。7 r0 F8 P) R+ J
不够专业,凑合着看吧.呵呵.作者: uqHZau 时间: 2020-6-2 17:33
就是说X,Y是用来定位的,C是用来填充颜色的。& e6 [* J8 R+ ~4 V$ s' |0 g% T
参数C要求至少是一个矩阵, : C* K: S1 n9 A3 @7 D而参数X,Y可以是向量,也可以是矩阵。 ; w; M# S+ l/ P X, p当X,Y是向量时,X与C的行对应,Y与C的列对应,因此向量X和Y的维数必须要求与C的行与列统一, ' l5 I: q2 C" O% d当X,Y都是矩阵时,要求X,Y必须是和C一样大小的矩阵。 - R- e! u' f4 j; F S2 g# F# J+ ^# I/ K& L& r4 a
所以使用时注意检查X,Y,C的大小和维数。