Effacer les filtres
Effacer les filtres

How to add a colorbar in a heatmap?

2 vues (au cours des 30 derniers jours)
Julia Moore
Julia Moore le 2 Juin 2020
Commenté : darova le 13 Juin 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 commentaires
Julia Moore
Julia Moore le 3 Juin 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 le 13 Juin 2020
you mean text?

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Data Distribution Plots dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by