필터 지우기
필터 지우기

colormap for a matrix

조회 수: 68 (최근 30일)
MiauMiau
MiauMiau 2017년 12월 10일
댓글: Image Analyst 2017년 12월 10일
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?

채택된 답변

Image Analyst
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
MiauMiau
MiauMiau 2017년 12월 10일
Thanks! A quick other question: How can I change the colormap I want to use?
Image Analyst
Image Analyst 2017년 12월 10일
cmap = hsv(256); % Or whatever function you want like jet(), hot(), autumn(), etc.
colorbar(gca, cmap);

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Orange에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by