#54 Grouped violinplot






If you have one numerical variable, several groups, and subgroups, you probably need to make a grouped violinplot.

Note that you can use faceting as well to solve this kind of dataset.






# library & dataset
import seaborn as sns
df = sns.load_dataset('tips')

# Grouped violinplot
sns.violinplot(x="day", y="total_bill", hue="smoker", data=df, palette="Pastel1")

Leave a Reply

Your email address will not be published.