how to label multiple bars within the same x-value
Afficher commentaires plus anciens
Hej im trying to create a plot of some testvalues, and i simply cant figure out a way to label multiple bars within the same x-value.
The test data comes out in a 6 x M matrix telling the time datacollection time and a 4 x M matrix with the testdata were each column is zone1, zone2, zone3 and zone4.
i've tried this so far:
Zones={'zone1','zone2','zone3','zone4'};
X=tvec_a(:,4);
Y=data_a;
bar(X,Y,1)
set(gca,'xticklabel',Zones)
title('Hourly consumption')
xlabel('Hour')
ylabel('Consumption')
But this simply output all four columns with the same same instead of each column was devided into zones for each x-val:

Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Get Started with Signal Processing Toolbox dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

