pairplot主要的参数及其用法
kind
:用于控制非对角线上的图的类型,可选"scatter"
与"reg"
diag_kind
:控制对角线上的图的类型,可选"hist"
与"kde"
penguins = sns.load_dataset("penguins") sns.pairplot(penguins)
sns.pairplot(penguins, hue="species", diag_kind="hist")
The kind
parameter determines both the diagonal and off-diagonal plotting style. Several options are available, including using kdeplot() to draw KDEs:
sns.pairplot(penguins, kind="kde")
Or histplot() to draw both bivariate and univariate histograms:
sns.pairplot(penguins, kind="hist")
The markers
parameter applies a style mapping on the off-diagonal axes. Currently, it will be redundant with the hue
variable:
sns.pairplot(penguins, hue="species", markers=["o", "s", "D"])