Filter löschen
Filter löschen

How to add a colorbar in a heatmap?

2 Ansichten (letzte 30 Tage)
Julia Moore
Julia Moore am 2 Jun. 2020
Kommentiert: darova am 13 Jun. 2020
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 Kommentare
Julia Moore
Julia Moore am 3 Jun. 2020
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 am 13 Jun. 2020
you mean text?

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Data Distribution Plots 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!

Translated by