
how to apply colors to bar chart.
2 ビュー (過去 30 日間)
古いコメントを表示
x=[10,20,30] b=[20,29,32] a=uisetcolor('select color'); bar(x,y,a);
it shows input argument error.
0 件のコメント
採用された回答
Image Analyst
2017 年 1 月 6 日
See my attached demo.

2 件のコメント
Image Analyst
2017 年 1 月 6 日
ARYA's "Answer" moved here:
I want to choose the color from that option only. How to apply selected color
Image Analyst
2017 年 1 月 6 日
I don't understand. Are you talking about my demo? It does ask you to choose a color scheme and does apply it.
If you want a single color for all bars, simply specify the 'FaceColor'
bar(x, y, 'FaceColor', 'r'); % Red bars.
bar(x, y, 'FaceColor', [0, 0.5, 0]); % Dark Green bars.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Bar Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!