Filter löschen
Filter löschen

Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

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

2 Ansichten (letzte 30 Tage)
rkepp12
rkepp12 am 19 Aug. 2016
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
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?

Antworten (0)

Diese Frage ist geschlossen.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by