How can I change color in barh graph
14 views (last 30 days)
Show older comments
How can I change colors (blue and yellow as defualt) to any other colors in barh graph in Matlab?
0 Comments
Accepted Answer
Sean de Wolski
on 24 Jun 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
More Answers (0)
See Also
Categories
Find more on Graphics Object Programming in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!