MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   [MATLAB基础] 两个图像显示两个colorbar的问题 (https://www.labfans.com/bbs/showthread.php?t=21341)

380447486 2019-06-10 15:53

两个图像显示两个colorbar的问题
 
请教各位一个问题:两个图像需要设置两个colorbar,前期查了一些资料需要使用cbfreeze,但是在实际运行中确存在问题,图像可以正常显示,colorbar显示不对,正常应该为一彩色的色标,不知道如何修改,请各位指教?
部分代码:
subplot(2,1,1);
colormap([0 150 0;
0 0 162;
0 107 253;
0 186 253;
111 248 255;
0 150 50;
0 220 0;
180 255 180;
196 166 0;
255 255 0;
238 255 0;
255 0 0;
255 100 100;
255 180 180;
150 0 180;
200 100 155;
241 198 253;
]/255);
caxis([-10,75]);
mesh(X11,Y11,Z11,rad_ref');
freezeColors;
colorbar;
cbfreeze;

程序报错信息:
??? Error using ==> colormap at 56
First argument must be a scalar axes handle.

Error in ==> cbfreeze at 346
cmap = colormap(fig);

Error in ==> RADARTEST at 146
cbfreeze;


所有时间均为北京时间。现在的时间是 14:29

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.