필터 지우기
필터 지우기

Info

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

How do I get rid of the flat coloring in a bar graph?

조회 수: 2 (최근 30일)
rkepp12
rkepp12 2016년 8월 19일
마감: MATLAB Answer Bot 2021년 8월 20일
I am trying to create bar graphs with two different sets of data plotted on the same axes. Below is the code I am using to produce the bar graphs:
figure(10+1000*i+100*j)
bar(syncedCrankPhase_rev_avg, datVec_emg_hist(:,3), 'FaceColor', 'r')
hold on
bar(syncedCrankPhase_rev_avg, datVec_emg_hist(:,4), 'FaceColor', 'b')
hold off
xlabel('Crank Position (degrees from +x axis)')
ylabel('Probability of Onset')
title('Average Onset Detection of Biceps and Triceps Over Crank Revolution')
legend('Biceps', 'Triceps')
I have also attached the plot that it creates. The problem is that there should be two separate data sets (in two separate colors), but instead I get a single bar graph with the data sets merged together and flat color shading. Does anyone know how I can fix this? Is it a problem with my settings?

답변 (0개)

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by