bars turn black when overplotted

Hello,
I want to overplot three bar graphs:
figure; bar(data1);hold on;
bar(data2,'r');hold on;
bar(data3,'g');hold on;
If I do that, the bars graphs are plotted in one figure, but annoyingly, only the first one maintains its color (blue by default), whereas the following two are both plotted in black. Could anyone help?
[EDITOR: This code is executable:
clf;
bar(rand(1,3));
hold on;
bar(rand(1,3),'r');
hold on;
bar(rand(1,3),'g');
)

댓글 수: 1

Doug Hull
Doug Hull 2012년 10월 24일
I tried this with the modified code in your question. I do not see the problem.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Environment and Settings에 대해 자세히 알아보기

태그

질문:

2012년 10월 24일

Community Treasure Hunt

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

Start Hunting!

Translated by