Equal Bin Sizes in Histogram Probability Distribution Function (PDF)
Afficher commentaires plus anciens
h1 = histogram(Duration);
h1.Normalization = 'probability';
h1.BinWidth = 0.0006;
hold on
h2 = histogram(Duration1);
h2.Normalization = 'probability';
h2.Binwidth = 0.0006;
hold off
xlabel ('Log {Bubble Duration(Seconds)}','Fontsize',16);
ylabel ('Probability Distribution Function','Fontsize',16);
set(gca,'xscale','log');
set(gca,'yscale');
% ylim([0 0.16])
xlim([0 0.05])
title ('Bubble Duration - 26LPS Toe & Recirculating Region','FontSize',20)
legend ('Toe of the Jump','Recirculating Region ~ 75mm','Fontsize',16);
Hi Everyone,
I am plotting a normalised histogram (probability) & I want it on a semi-log scale, i.e, I want my X-axis to be logarthmic & I want my Yaxis to be linear as it is.
How can I have bins of equal widths in a logarthmic scale. In linear scale it is easy just specify the Bin widths & it will be equal but how do i do it in a Logarthmic scale? I am also attaching my code below.
Any Help will be much appreciated.
Réponses (1)
Jeff Miller
le 7 Avr 2021
1 vote
The histogram function has a parameter 'BinEdges' that will allow you to specify any bins you like. So, make whatever bin edges you like--e.g., on a log scale such as mybinedges = exp(1:5).
Catégories
En savoir plus sur Histograms dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!