Back to Seaborn

Jointplot

doc/_docstrings/jointplot.ipynb

0.13.21.1 KB
Original Source
python
import seaborn as sns
sns.set_theme(style="white")
python
penguins = sns.load_dataset("penguins")
sns.jointplot(data=penguins, x="bill_length_mm", y="bill_depth_mm")
python
sns.jointplot(data=penguins, x="bill_length_mm", y="bill_depth_mm", hue="species")
python
sns.jointplot(data=penguins, x="bill_length_mm", y="bill_depth_mm", hue="species", kind="kde")
python
sns.jointplot(data=penguins, x="bill_length_mm", y="bill_depth_mm", kind="reg")
python
sns.jointplot(data=penguins, x="bill_length_mm", y="bill_depth_mm", kind="hist")
python
sns.jointplot(data=penguins, x="bill_length_mm", y="bill_depth_mm", kind="hex")
python
sns.jointplot(
    data=penguins, x="bill_length_mm", y="bill_depth_mm",
    marker="+", s=100, marginal_kws=dict(bins=25, fill=False),
)
python
sns.jointplot(data=penguins, x="bill_length_mm", y="bill_depth_mm", height=5, ratio=2, marginal_ticks=True)
python
g = sns.jointplot(data=penguins, x="bill_length_mm", y="bill_depth_mm")
g.plot_joint(sns.kdeplot, color="r", zorder=0, levels=6)
g.plot_marginals(sns.rugplot, color="r", height=-.15, clip_on=False)