
how to apply colors to bar chart.
조회 수: 1 (최근 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!