how to apply colors to bar chart.

조회 수: 1 (최근 30일)
ARYA NAYAK
ARYA NAYAK 2017년 1월 6일
댓글: Image Analyst 2017년 1월 6일
x=[10,20,30] b=[20,29,32] a=uisetcolor('select color'); bar(x,y,a);
it shows input argument error.

채택된 답변

Image Analyst
Image Analyst 2017년 1월 6일
See my attached demo.
  댓글 수: 2
Image Analyst
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
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 CenterFile Exchange에서 Bar Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by