Stacked bar plot, assign "names" to color
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens

How can I assign names to color? In the figure, say, in the right side list, I will assign "Jack's Contribution" to blue instead of "data 6".
0 commentaires
Réponses (1)
Scott MacKenzie
le 10 Juin 2021
Modifié(e) : Scott MacKenzie
le 10 Juin 2021
Just add labels to your legend:
labels = { 'Jack', 'Fred', 'abc', 'def' }; % fill out, as desired
legend(labels);
0 commentaires
Voir également
Catégories
En savoir plus sur Annotations 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!