What is the unit of the y-axis when using distplot to plot a histogram? I have plotted different histograms together with a normal fit and I see that in one case, it has a range of 0 to 0.9 while in another a range of 0 to 4.5.
Thank you.
What is the unit of the y-axis when using distplot to plot a histogram? I have plotted different histograms together with a normal fit and I see that in one case, it has a range of 0 to 0.9 while in another a range of 0 to 4.5.
Thank you.
From
help(sns.distplot)
:A density is scaled so that the area under the curve is 1, so no individual bin will ever be taller than 1 (the whole dataset)[2]. But kde is on by default and overrides norm_hist, so norm_hist changes the y-units only if you explicitly turn kde off:
[2] clarification from mwaskom, thanks!