How can I change color in barh graph
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
How can I change colors (blue and yellow as defualt) to any other colors in barh graph in Matlab?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/151569/image.jpeg)
0 commentaires
Réponse acceptée
Sean de Wolski
le 24 Juin 2015
You modify the 'FaceColor' of the bar:
h = barh(rand(4,2),'stacked')
h(1).FaceColor = 'r'; % color
h(2).FaceColor = [0.3 0.78 0.1];% rgb
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur 2-D and 3-D Plots 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!