I created a histogram in seaborn using distplot. My data is type int64, but the kde in the histogram is wavy. How can I fix it?
Asked
Active
Viewed 316 times
0
-
The kde is meant for continuous distributions. You clearly have a discrete distribution with only 6 values.The kde draws a gauss curve around each value and sums those. You could game the kde somewhat via `sns.distplot(..., kde_kws={'bw':1.1})` setting the bandwidth for the kde to 1.1 or some nearby value. – JohanC Apr 28 '20 at 20:23
-
1Does this answer your question? [How to draw distribution plot for discrete variables in seaborn](https://stackoverflow.com/questions/48990594/how-to-draw-distribution-plot-for-discrete-variables-in-seaborn) – JohanC Apr 28 '20 at 20:30
-
Appreciate the response and suggested work-around. Thanks. – BRV Apr 28 '20 at 20:31