Flexibly plot a univariate distribution of observations.
This function combines the matplotlib `hist` function (with automatic calculation of a good default bin size) with the seaborn [`kdeplot()`](seaborn.kdeplot.html#seaborn.kdeplot"seaborn.kdeplot") and [`rugplot()`](seaborn.rugplot.html#seaborn.rugplot"seaborn.rugplot") functions. It can also fit `scipy.stats` distributions and plot the estimated PDF over the data.
> Whether to plot a gaussian kernel density estimate.
`kde`:布尔值,可选参数。
`rug`:bool, optional
> 是否绘制高斯核密度估计图。
> Whether to draw a rugplot on the support axis.
`rug`:布尔值,可选参数。
`fit`:random variable object, optional
> 是否在横轴上绘制观测值竖线。
> An object with <cite>fit</cite> method, returning a tuple that can be passed to a <cite>pdf</cite> method a positional arguments following an grid of values to evaluate the pdf on.
`bw`:{‘scott’ | ‘silverman’ | scalar | pair of scalars },可选参数
> Name of reference method to determine kernel size, scalar factor, or scalar for each dimension of the bivariate plot. Note that the underlying computational libraries have different interperetations for this parameter: `statsmodels` uses it directly, but `scipy` treats it as a scaling factor for the standard deviation of the data.
> Number of discrete points in the evaluation grid.
> 评估网格中的离散点数。
`cut`:scalar, optional
`cut`:标量,可选参数。
> Draw the estimate to cut * bw from the extreme data points.
> 绘制估计值以从极端数据点切割* bw。
`clip`:pair of scalars, or pair of pair of scalars, optional
`clip`:一对标量,可选参数。
> Lower and upper bounds for datapoints used to fit KDE. Can provide a pair of (low, high) bounds for bivariate plots.
> 用于拟合KDE图的数据点的上下限值。可以为双变量图提供一对(上,下)边界。
`legend`:bool, optional
`legend`:布尔值,可选参数。
> If True, add a legend or label the axes when possible.
> 如果为True,为绘制的图像添加图例或者标记坐标轴。
`cumulative`:bool, optional
`cumulative`:布尔值,可选参数。
> If True, draw the cumulative distribution estimated by the kde.
> 如果为True,则绘制kde估计图的累积分布。
`shade_lowest`:bool, optional
`shade_lowest`:布尔值,可选参数。
> If True, shade the lowest contour of a bivariate KDE plot. Not relevant when drawing a univariate plot or when `shade=False`. Setting this to `False` can be useful when you want multiple densities on the same Axes.