Back to Seaborn

Lmplot

doc/_docstrings/lmplot.ipynb

0.13.2708 B
Original Source
python
import seaborn as sns
sns.set_theme(style="ticks")
penguins = sns.load_dataset("penguins")
python
sns.lmplot(data=penguins, x="bill_length_mm", y="bill_depth_mm")
python
sns.lmplot(data=penguins, x="bill_length_mm", y="bill_depth_mm", hue="species")
python
sns.lmplot(
    data=penguins, x="bill_length_mm", y="bill_depth_mm",
    hue="species", col="sex", height=4,
)
python
sns.lmplot(
    data=penguins, x="bill_length_mm", y="bill_depth_mm",
    col="species", row="sex", height=3,
)
python
sns.lmplot(
    data=penguins, x="bill_length_mm", y="bill_depth_mm",
    col="species", row="sex", height=3,
    facet_kws=dict(sharex=False, sharey=False),
)