Skip to content
Advertisement

Multiple Columns for HUE parameter in Seaborn violinplot

I am working with tips data set, and here is the head of data set.

JavaScript

My code is

JavaScript

I want a violinplot of day with total_bill in which hue is sex and smoker, but I can not find any option to set multiple values of hue. Is there any way?

Advertisement

Answer

You could use a seaborn.catplot in order to use 'sex' as hue and 'smoker' as column for generating two side by side violinplot.
Check this code:

JavaScript

which gives me this plot:

enter image description here

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement