show a digit matrix with segmentation line
古いコメントを表示
回答 (1 件)
Benjamin Großmann
2021 年 4 月 30 日
編集済み: Benjamin Großmann
2021 年 4 月 30 日
matrix = [ 1 1 1 1 2 2 2 2;
1 1 1 2 2 2 2 2;
3 3 3 3 3 2 2 2;
3 3 3 3 3 3 3 3];
heatmap(matrix, 'Colormap', [1 0 0; 0 0 1; 0 1 0]) % <-- EDIT: colormap definition in heatmap function call changed
colorbar('off')

2 件のコメント
HG
2021 年 5 月 4 日
Benjamin Großmann
2021 年 5 月 4 日
You can use patch() with properties 'FaceColor' and 'EdgeColor' to plot colored surfaces with black line boundaries.
カテゴリ
ヘルプ センター および File Exchange で Lighting, Transparency, and Shading についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
