How to plot heat map using MATLAB?

394 Ansichten (letzte 30 Tage)
Abdelwahab Afifi
Abdelwahab Afifi am 12 Aug. 2021
Kommentiert: Abdelwahab Afifi am 12 Aug. 2021
I have matrix with dimensions [4096, 181], I want to draw a heatmap for such matrix as in the following figure. How can i do so?

Akzeptierte Antwort

Chunru
Chunru am 12 Aug. 2021
Bearbeitet: Chunru am 12 Aug. 2021
a = peaks(40);
imagesc(a)
colormap(hsv(512))
colorbar
  4 Kommentare
Abdelwahab Afifi
Abdelwahab Afifi am 12 Aug. 2021
I noticed that there is a red colour at the top and bottom of the colour map. this causes confusion. is it possible to limit the colour map exactly as in the pic I attached?
Abdelwahab Afifi
Abdelwahab Afifi am 12 Aug. 2021
I got it
colormap turbo
colorbar

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Colormaps finden Sie in Help Center und File Exchange

Tags

Produkte


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by