How can I change color in barh graph

28 ビュー (過去 30 日間)
Moe
Moe 2015 年 6 月 24 日
コメント済み: Moe 2015 年 6 月 24 日
How can I change colors (blue and yellow as defualt) to any other colors in barh graph in Matlab?

採用された回答

Sean de Wolski
Sean de Wolski 2015 年 6 月 24 日
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
  1 件のコメント
Moe
Moe 2015 年 6 月 24 日
Thanks Sean!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by