how to label multiple bars within the same x-value
Mostrar comentarios más antiguos
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:

Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Get Started with Signal Processing Toolbox en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

