Why is my histogram only displaying 3 bins? And why is the xlabel not printing?
1 view (last 30 days)
Show older comments
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 Comments
Answers (1)
Walter Roberson
on 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 Comments
See Also
Categories
Find more on Histograms in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!