colormap for a matrix
25 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
MiauMiau
am 10 Dez. 2017
Kommentiert: Image Analyst
am 10 Dez. 2017
Given a matrix:
0 0.0104 0.0027
0.0104 0 0.0163
0.0027 0.0163 0.0000
I am using imagesc(corrData). However I would like to only have the integers displayed on x- and y-axis ("1","2" and "3"). How can I accomplish that?
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 10 Dez. 2017
Use xticks and yticks():
m = [ 0 0.0104 0.0027
0.0104 0 0.0163
0.0027 0.0163 0.0000]
imagesc(m);
axis on;
xticks(1:size(m, 2));
yticks(1:size(m, 1));
2 Kommentare
Image Analyst
am 10 Dez. 2017
cmap = hsv(256); % Or whatever function you want like jet(), hot(), autumn(), etc.
colorbar(gca, cmap);
Weitere Antworten (0)
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!