필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Three plots in one bar graph: Need different ticklabels

조회 수: 1 (최근 30일)
Tobias
Tobias 2013년 4월 13일
마감: MATLAB Answer Bot 2021년 8월 20일
I'm doing a bar graph, in which I want three bars each with a different color. To do this, I have used the hold command and three plots (Bonus question: Is there an easier way to do this?)
Anyway, I need the ticklabel to be specific time values, but I can't seem to make that work.
subplot(2,3,6)
hold on
bar(1,subject.correct(1,1), 'r')
bar(2,subject.correct(2,1), 'b')
bar(3,subject.correct(3,1), 'y')
hold off
title('Reaktionshastighed - Korrekte svar')
xlabel('Testnummer')
ylabel('Korrekte svar (%)')
set(gca,'XTickLabel',{time_1, time_2, time_3})
Previously, my code can be seen below, which worked perfectly with my Xticklabel, however all three bars were the same color:
bar(1:3,subject.correct, 'r')
  댓글 수: 1
Tobias
Tobias 2013년 4월 13일
No answers in 11 hours to what may seem like a pretty straight-forward question. Is it possible at all with the current Matlab build?

답변 (0개)

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by