I am trying to plot a seaborn.violinplot
, which shows the .mean
on the y-axis, but when I try to plot it, nothing shows up on my plot for some reason.
This the code I am using:
fig, ax = plt.subplots(figsize=(15,10))
sns.catplot(x="Day", y=df[['Time']].mean(), hue="Smoker",
data=df, kind="violin")
As you can see in my code, I am trying to plot the .mean
of the Time
attribute in my plot, which should show in the y-axis.
Any help on how to achieve this, including what I am doing wrong, is much appreciated.
Thank you for you time.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…