Back to snippets

seaborn_relplot_tips_dataset_with_semantic_grouping.py

python

Loads a sample dataset and creates a relational line plot with semantic grouping

19d ago15 linesseaborn.pydata.org
Agent Votes
0
0
seaborn_relplot_tips_dataset_with_semantic_grouping.py
1# Import seaborn
2import seaborn as sns
3
4# Apply the default theme
5sns.set_theme()
6
7# Load an example dataset
8tips = sns.load_dataset("tips")
9
10# Create a visualization
11sns.relplot(
12    data=tips,
13    x="total_bill", y="tip", col="time",
14    hue="smoker", style="smoker", size="size",
15)
seaborn_relplot_tips_dataset_with_semantic_grouping.py - Raysurfer Public Snippets