1. Grundlagen¶
aus https://seaborn.pydata.org/introduction.html
# Import seaborn
import seaborn as sns
# Apply the default theme
sns.set_theme()
# Load an example dataset
tips = sns.load_dataset("tips")
# Create a visualization
sns.relplot(
data=tips,
x="total_bill", y="tip", col="time",
hue="smoker", style="smoker", size="size",
)
<seaborn.axisgrid.FacetGrid at 0x1b0bb41bdf0>
sns.lmplot(data=tips, x="total_bill", y="tip", col="time", hue="smoker")
<seaborn.axisgrid.FacetGrid at 0x1b0bb578670>
sns.displot(data=tips, x="total_bill", col="time", kde=True)
<seaborn.axisgrid.FacetGrid at 0x1b0bb674700>
sns.catplot(data=tips, kind="swarm", x="day", y="total_bill", hue="smoker")
<seaborn.axisgrid.FacetGrid at 0x1b0bb6d0430>
sns.catplot(data=tips, kind="violin", x="day", y="total_bill", hue="smoker", split=True)
<seaborn.axisgrid.FacetGrid at 0x1b0bc8dfa30>
sns.catplot(data=tips, kind="bar", x="day", y="total_bill", hue="smoker")
<seaborn.axisgrid.FacetGrid at 0x1b0bc8f27c0>
penguins = sns.load_dataset("penguins")
sns.jointplot(data=penguins, x="flipper_length_mm", y="bill_length_mm", hue="species")
<seaborn.axisgrid.JointGrid at 0x1b0bcb7bf40>