6
A
回答
6
从help(sns.distplot)
:
norm_hist:BOOL,otional 如果真,直方图显示高度,密度,而不是数量。 如果绘制了KDE或拟合密度,则这是隐含的。
甲密度被标定,因此,曲线下面积为1,所以没有独立的贮藏将永远不会大于1(整个数据集)更高[2]。但KDE默认为开启和norm_hist覆盖,所以norm_hist改变Y单位只有当你明确把KDE关:
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
fig, axs = plt.subplots(figsize=(6,6), ncols=2, nrows=2)
data = np.random.randint(0,20,40)
for row in (0,1):
for col in (0,1):
sns.distplot(data, kde=row, norm_hist=col, ax=axs[row, col])
axs[0,0].set_ylabel('NO kernel density')
axs[1,0].set_ylabel('KDE on')
axs[1,0].set_xlabel('norm_hist=False')
axs[1,1].set_xlabel('norm_hist=True')
[2]澄清mwaskom,谢谢!
相关问题
- 1. Seaborn:从distplot
- 2. Seaborn Distplot和Barplot
- 3. 无法在seaborn distplot中显示图例
- 4. Seasborn Distplot无响应
- 5. Seaborn:相对频率的distplot()
- 6. Seaborn:设置distplot bin范围?
- 7. 对应于给定X值的Python Seaborn Distplot Y值
- 8. Seaborn地块kdeplot但不是distplot
- 9. Seaborn distplot与rugplot从不同阵列
- 10. 在使用Python中
- 11. 使用。在python中?
- 12. Seaborn - 如何解释distplot中x轴的值?
- 13. 限制在seaborn x的范围distplot KDE估计
- 14. 在Python中使用中文
- 15. 在Python API中使用2段python
- 16. Python:在Python中使用abc <2.6
- 17. 在Python 3.4中使用python-zxcvbn
- 18. 在旧版Python中使用Python扩展
- 19. Python Bcrypt只能在Python中使用Interpreter
- 20. 在python x中使用gspread python lib
- 21. 在python shell中使用live_settings
- 22. 在Python中使用usleep
- 23. 在Python中使用Matlab
- 24. 在python中使用模块
- 25. 在Python中使用Weka
- 26. 在Python中使用.NET dll
- 27. 在Python中使用heroku:config vars
- 28. 在Python中使用继承
- 29. 在Python中使用` - >`?
- 30. 在python中使用aubio.note()?
这是有帮助的,但我认为这样做应该是明智的,因为密度是按比例缩小的,因此曲线下面积为1. – mwaskom
谢谢cphlewis ... – Harry
没问题,Harry。如果它回答你的问题,请检查它。 – cphlewis