displot
函数原型:
seaborn.displot(
data=None,
*,
x=None,
y=None,
hue=None,
row=None,
col=None,
weights=None,
kind='hist',
rug=False,
rug_kws=None,
log_scale=None,
legend=True,
palette=None,
hue_order=None,
hue_norm=None,
color=None,
col_wrap=None,
row_order=None,
col_order=None,
height=5,
aspect=1,
facet_kws=None,
**kwargs
)
Figure-level interface for drawing distribution plots onto a FacetGrid.
This function provides access to several approaches for visualizing the univariate or bivariate distribution of data, including subsets of data defined by semantic mapping and faceting across multiple subplots. The kind parameter selects the approach to use:
- histplot() (with kind=“hist”; the default)
- kdeplot() (with kind=“kde”)
- ecdfplot() (with kind=“ecdf”; univariate-only)
Additionally, a rugplot() can be added to any kind of plot to show individual observations.
Extra keyword arguments are passed to the underlying function, so you should refer to the documentation for each to understand the complete set of options for making plots with this interface.
See the distribution plots tutorial for a more in-depth discussion of the relative strengths and weaknesses of each approach. The distinction between figure-level and axes-level functions is explained further in the user guide.
参数:
- data’:(pandas.DataFrame,numpy.ndarray, mapping, or sequence):Input data structure. Either a long-form collection of vectors that can be assigned to named variables or a wide-form dataset that will be internally reshaped.
- x, y(vectors or keys in data):Variables that specify positions on the x and y axes.
- hue(vector or key in data):Semantic variable that is mapped to determine the color of plot elements.
- row, col(vectors or keys in data):Variables that define subsets to plot on different facets.
- kind({“hist”, “kde”, “ecdf”}):可视化数据的方式,选选择underlying的画图函数并且determines the additional set of valid parameters.
- rug(bool):如果为真,show each observation with marginal ticks (as in rugplot()).
|