필터 지우기
필터 지우기

How can I change the color of every data set in a clustered bar graph?

조회 수: 1 (최근 30일)
matlablearner
matlablearner 2014년 10월 22일
답변: Star Strider 2014년 10월 22일
The above colors are default colors given by MATLAB. How can I change the blue and red colors to my choice of colors ?

답변 (1개)

Star Strider
Star Strider 2014년 10월 22일
This works:
d = 1./randi(10, 10, 2);
figure(1)
hb = bar(d)
set(hb(1), 'FaceColor', 'm')
set(hb(2), 'FaceColor', 'g')

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by