How do you remove tick marks (not labels) from a colorbar?
37 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
L'O.G.
am 15 Sep. 2022
Beantwortet: Jonas
am 15 Sep. 2022
I have a figure plotted with imagesc and the associated colorbar. How do I remove the tick marks from the colorbar?
0 Kommentare
Akzeptierte Antwort
Star Strider
am 15 Sep. 2022
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 Kommentare
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Orange finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!