How can I change color in barh graph

28 visualizzazioni (ultimi 30 giorni)
Moe
Moe il 24 Giu 2015
Commentato: Moe il 24 Giu 2015
How can I change colors (blue and yellow as defualt) to any other colors in barh graph in Matlab?

Risposta accettata

Sean de Wolski
Sean de Wolski il 24 Giu 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

Più risposte (0)

Categorie

Scopri di più su 2-D and 3-D 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!

Translated by