【发布时间】:2021-02-28 11:01:13
【问题描述】:
如何使颜色条框周围的矩形线变为白色,但保持刻度标签为黑色?
下面的可重现代码:
colormap(flipud(autumn(6))); % Create Colormap
cb = colorbar; % Create Colorbar
cb.Ticks = [.1667 .3334 .5001 .6668 .8335]; % Create ticks
cb.TickLabels = ({'0%','5%','10%','15%','20%'});
cb.TickLength = 0;
cb.Color = 'w'; % Everything becomes white, I only want the rectangular color of the box to be white
【问题讨论】:
-
感谢@LuisMendo,我修改了问题以使其更清晰
-
请提及您的 MATLAB 版本。另外,你用的是图形还是 uifigures?
标签: matlab border customization matlab-figure colorbar