필터 지우기
필터 지우기

How to add a colorbar in a heatmap?

조회 수: 2 (최근 30일)
Julia Moore
Julia Moore 2020년 6월 2일
댓글: darova 2020년 6월 13일
Hey guys!
I am trying to do a heatmap, using a the heatmap function. But I am not being capable of adding a colorbar. Does anyone know if it is possible using the MATLAB version 2016a?
Also my current heatmap is like this, I would like to invert the beggining of the rows position. Is it possible that the row number 1 start on the first line not in the last one? And how could I eliminate the elements above the main diagonal?
Thnkss
  댓글 수: 3
Julia Moore
Julia Moore 2020년 6월 3일
Yeah it didn't worked, due to the version I guess. But I was trying to do it in a different way, like this:
figure;
imagesc(RPEARSONIDHma,[-1 1])
colorbar
set(gca,'YTick', [1:11],'YTickLabel',{'1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11'})
set(gca,'XTick', [1:11],'XTickLabel',{'1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11'})
set(gcf,'Colormap',autumn)
Do you know if it is possible to make the values appear on the image?
darova
darova 2020년 6월 13일
you mean text?

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Distribution Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by