I'm trying to build a plot like one from excel in seaborn. I basically have 12 functions that can have x number of errors and I want to distinguish between active and inactive users. Here's the chart in excel:
I tried this in Colab:
ax = sns.catplot(data=df_grp_pass.melt(id_vars =['function', 'M1_pass', 'study'], value_vars=['error_message']),kind="bar", x='variable', y='M1_pass',col='study', ci=None, estimator=sum)
but it doesn't work. I just get this:
I also tried the following but doesn't work either:
ax = sns.barplot(data=df_grp_pass, x='function', y='M1_pass', hue='study', estimator=sum)
I get the following:
Any help would be greatly appreciated.
thanks!
source https://stackoverflow.com/questions/72902103/seaborn-catplot-with-two-categories
Comments
Post a Comment