
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!