colormap for a matrix
66 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
採用された回答
Image Analyst
2017 年 12 月 10 日
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 件のコメント
Image Analyst
2017 年 12 月 10 日
cmap = hsv(256); % Or whatever function you want like jet(), hot(), autumn(), etc.
colorbar(gca, cmap);
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Orange についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!