Bar figure helps with group on the x-axis
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hello everyone, I need help with grouping my data, where the central value on the x-axis is the corresponding number, not approximations.
x = [1.2132312 5.3413413212];
vals = [1.12234 1.34234 0.52342741238 2.4132213 3.1231232 5.123123 8.123123;5.793371156 10.506158125 1.23213 1.3123 1.5 1.5 1.5]
b = bar(x,vals,'grouped');
For example, the group of 7 bars that comes out below only the number 1.2132312 and for the other set the number 5.3413413212
0 Commenti
Risposte (1)
Voss
il 26 Ago 2022
Modificato: Voss
il 26 Ago 2022
Like this?
x = [1.2132312 5.3413413212];
vals = [1.12234 1.34234 0.52342741238 2.4132213 3.1231232 5.123123 8.123123;5.793371156 10.506158125 1.23213 1.3123 1.5 1.5 1.5];
b = bar(x,vals,'grouped');
set(gca(),'XTick',x)
Or this?
b = bar(x,vals,'grouped');
ax = gca();
ax.XTick = x;
ax.XAxis.TickLabelFormat = '%.10f';
Or this?
b = bar(x,vals,'grouped');
ax = gca();
ax.XTick = x;
ax.XTickLabel = {'1.2132312' '5.3413413212'};
0 Commenti
Vedere anche
Categorie
Scopri di più su Bar Plots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!