#34 Grouped Boxplot

 

 

 

 

Grouped boxplot are used when you have a numerical variable, several groups and subgroups.

It is easy to realize one using seaborn.Y is your numerical variable, x is the group column, and hue is the subgroup column.

 

 

 

 

 

 


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

# Grouped boxplot
sns.boxplot(x="day", y="total_bill", hue="smoker", data=df, palette="Set1")
#sns.plt.show()

Leave a Reply

Your email address will not be published.