Why is my histogram only displaying 3 bins? And why is the xlabel not printing?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Code:
histo_1 = histogram(histovalues,'BinWidth',0.01);
xlabel('$Q_\mathrm{ice} \mathrm{Nm}$')
% inserting normal distribution fit onto the histogram:
rng default; % For reproducibility
norm_fit = normrnd(1,10,100,1);%random arrays from normal distribution, normrnd(mean, sd, rows of norm_fit, norm_fit cols)
histfit(norm_fit);
0 Kommentare
Antworten (1)
Walter Roberson
am 11 Aug. 2022
You ask for BinWidth 0.01 . Perhaps your data spans less than 0.03 so only 3 bins are justified.
xlabel('$Q_\mathrm{ice} \mathrm{Nm}$')
You should probably
xlabel('$Q_\mathrm{ice} \mathrm{Nm}$', 'interpreter', 'latex')
0 Kommentare
Siehe auch
Kategorien
Mehr zu Histograms finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!