I would like to annotate my violin plot with the number of observations in each group. So the question is essentially the same as this one, except:
- python instead of R,
- seaborn instead of ggplot, and
- violin plots instead of boxplots
Lets take this example from Seaborn API documentation:
import seaborn as sns
sns.set_style("whitegrid")
tips = sns.load_dataset("tips")
ax = sns.violinplot(x="day", y="total_bill", data=tips)
I'd like to have n=62, n=19, n=87, and n=76 on top of the violins. Is this doable?