Unnormalized y-axis when using KDE
See original GitHub issueWhen I do
sns.distplot(my_data, rug=True, norm_hist=False)
I get:
and when I do:
sns.distplot(my_data, rug=True, norm_hist=False)
I get:
Is there any way to have the Y-axis show raw counts (as in the 1st example above), when adding a kde plot? (2nd example above)?
Issue Analytics
- State:
- Created 9 years ago
- Reactions:6
- Comments:19 (7 by maintainers)
Top Results From Across the Web
What is y axis in seaborn distplot figure? - Stack Overflow
When you are only showing the histogram ( kde=False ) and you don't normalize ( norm_hist=False ), then the y-axis represents the count...
Read more >why does y axis sometimes change from normal histogram to ...
KDE is not the same as normalized histogram but for simplicity you can think like we normalize the curve with 1/AUC . If...
Read more >Distributions — Elements of Data Science - GitHub Pages
A kernel density estimate (KDE), which is like a smooth, continuous version of a histogram. For examples, we'll use data from the General...
Read more >Example of time KDE. The x-axis is unit fraction of one day ...
The x-axis is unit fraction of one day. Gaussian kernels for individual events are summed in order to compute the density of events...
Read more >Home - KDE Community
KDE Applications. Powerful, multi-platform, and for everyone. Use KDE software to surf the web, keep in touch with colleagues, friends and family ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It would be more informative than decorative. KDE and histogram summarize the data in slightly different ways. In general, when plotting a KDE, I don’t really care about what the actual values of the density function are at each point in the domain. Rather, I care about the shape of the curve. This contrasts with the histogram in which the values of each bar are something much more interpretable (number of samples in each bin).
Thus, it would be great to set the normalization of the KDE so that the density function integrates to a custom value thereby allowing the curve to be overlaid on the histogram.
Here’s my solution:
Hope this helps.