How to plot heat map using MATLAB?

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?

 Accepted Answer

Chunru
Chunru on 12 Aug 2021
Edited: Chunru on 12 Aug 2021
a = peaks(40);
imagesc(a)
colormap(hsv(512))
colorbar

4 Comments

Is it possible to adjust the colorbar to include the red colour?
use colormap as shown above
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?
I got it
colormap turbo
colorbar

Sign in to comment.

More Answers (0)

Categories

Products

Release

R2021a

Tags

Community Treasure Hunt

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

Start Hunting!