1

我没有得到一个很好的 pcolor 图,所以我需要做一个速度大小的等高线图,深度(等高线)和时间作为 x 轴。我知道还有其他选择,但我更喜欢等高线图。

figure;

timeC = x(in);                %  811 X 1 matrix
depC = [1.20,2.20,3.20];
depC = depC';                 % 3 X 1 matrix


ur = dat3(in,1:3);            % 811 X 3 matrix
vr = dat4(in,1:3);            % 811 X 3 matrix
[THETAc,Rc] = cart2pol(vr,ur);
vMag = Rc';                   % 3 X 811 matrix

hpc = pcolor(timeC,depC,vMag);
set(gca,'YDir','reverse');
set(hpc,'EdgeColor','none');
caxis([0,0.2]);
t = colorbar('peer',gca);
set(gca, 'xlim', [min(timeC) max(timeC)]);
datetick(handles.axes4,'x', 15, 'keeplimits'); % does not work with pcolor
4

1 回答 1

0

尝试help contourhelp contourf。您会发现函数参数与 pcolor 非常相似,因此您可能只需替换pcolorcontour,即

hcnt = contour(timeC,depC,vMag);

有关更多自定义选项,请参阅文档。

于 2012-07-20T18:01:24.300 回答