Effacer les filtres
Effacer les filtres

Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

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

2 vues (au cours des 30 derniers jours)
rkepp12
rkepp12 le 19 Août 2016
Clôturé : MATLAB Answer Bot le 20 Août 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?

Réponses (0)

Cette question est clôturée.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by