单变量
1、直方图 displot
seaborn.distplot(a, bins=None, hist=True, kde=True, rug=False, fit=None, hist_kws=None, kde_kws=None, rug_kws=None, fit_kws=None, color=None, vertical=False, norm_hist=False, axlabel=None, label=None, ax=None)
bins → 箱数
hist、ked、rug → bool,是否显示箱/密度曲线/数据分布
norm_hist → 直方图是否按照密度来显示,如果为False,显示计数
{hist,kde,rug,fit} _kws:字典,对应部分的各种参数。
vertical → 是否水平显示
fit → 可结合scipy库在图像上做拟合
label → 图例
axlabel → x轴标注
2、核密度估计图 kdeplot
核密度估计的步骤:
每一个观测附近用一个正态分布曲线近似
叠加所有观测的正态分布曲线
归一化
seaborn.kdeplot(data,data2 = None,shade = False,vertical = False,kernel ='gau',bw ='scott',gridsize = 100,cut = 3,clip = None,legend = True,cumulative = False,shade_lowest = True,cbar = False,cbar_ax =无,cbar_kws =无,ax =无,