
show a digit matrix with segmentation line
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Risposte (1)
Benjamin Großmann
il 30 Apr 2021
Modificato: Benjamin Großmann
il 30 Apr 2021
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 Commenti
Benjamin Großmann
il 4 Mag 2021
You can use patch() with properties 'FaceColor' and 'EdgeColor' to plot colored surfaces with black line boundaries.
Vedere anche
Categorie
Scopri di più su Surface and Mesh Plots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
