How to plot matrix to color band
5 views (last 30 days)
Show older comments
I have such a matrix
X=[1, 2, 1, 3, 2, 1, 4, 2, 1, 3 ;...
2, 1, 1, 3, 6, 2, 4, 3, 2, 1;...
4, 1, 7, 2, 4, 3, 2, 4, 1, 2;...
2, 1, 5, 7, 5, 6, 7, 1, 2, 3];
And I want to plot it like this
ofcourse with axis and colorbar
It is posible to do that?
0 Comments
Accepted Answer
Abderrahim. B
on 26 Jul 2022
Edited: Abderrahim. B
on 26 Jul 2022
X=[1, 2, 1, 3, 2, 1, 4, 2, 1, 3 ;...
2, 1, 1, 3, 6, 2, 4, 3, 2, 1;...
4, 1, 7, 2, 4, 3, 2, 4, 1, 2;...
2, 1, 5, 7, 5, 6, 7, 1, 2, 3];
heatmap(X, 'CellLabelColor', 'none')
colormap(flipud(gray))
colorbar
More Answers (0)
See Also
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!