How do you remove tick marks (not labels) from a colorbar?
68 ビュー (過去 30 日間)
古いコメントを表示
I have a figure plotted with imagesc and the associated colorbar. How do I remove the tick marks from the colorbar?
0 件のコメント
採用された回答
Star Strider
2022 年 9 月 15 日
Try this —
cm = [1 0 0; 1 1 1; 0 0 1]; % Basic Colormap
cmi = interp1([-2; 0; 5], cm, (-2:5)) % interpolated Colormap
M = randi([-2 5],9) % Matrix
figure
imagesc(M)
colormap(cmi)
hcb = colorbar;
figure
imagesc(M)
colormap(cmi)
hcb = colorbar;
hcb.TickLength = 0; % Set TickLength' To 0
.
0 件のコメント
その他の回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で Colormaps についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!