show a digit matrix with segmentation line
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
.
0 commentaires
Réponses (1)
Benjamin Großmann
le 30 Avr 2021
Modifié(e) : Benjamin Großmann
le 30 Avr 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 commentaires
Benjamin Großmann
le 4 Mai 2021
You can use patch() with properties 'FaceColor' and 'EdgeColor' to plot colored surfaces with black line boundaries.
Voir également
Catégories
En savoir plus sur Colormaps dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!