It comes out well in the histplot, but it doesn't draw well in the distplot.
Asked
Active
Viewed 503 times
0
-
maybe you need to zoom in on the Density axis (due to the huge magnitute of the x axis!) – Stef Jun 21 '22 at 11:22
-
Also, update seaborn to 0.11.2. `distplot` is deprecated. Use `sns.histplot` or `sns.displot`. – Trenton McKinney Jun 21 '22 at 15:24
2 Answers
1
Your x range of values is huge! sns.dist()
plots the distribution probability meaning the sum will equal to 1. So essentially with this huge magnitude of your x values, you'll have very small probability values. This and your y graph range is -1 to 1. If you change your y range, you should get something closer to what you'd expect to see.
So change your y scale to something like:
sns.distplot(df[target])
plt.ylim(0, .1**27)

chitown88
- 27,527
- 4
- 30
- 59
1
Please try sns.displot(data=df, x="target", kde=True)
or sns.displot(data=df, x="target", kind="kde")

Sammiti Yadav
- 78
- 1
- 6