0

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:

enter image description here

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:

enter image description here

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:

enter image description here

Any help would be greatly appreciated.

thanks!

Chapin
  • 169
  • 1
  • 7
  • 1
    Without your code and some data as [example] we barely can help here. How did you create the diagram in Excel (name of the chart, data source settings, pivot table layout) ? – hc_dev Jul 07 '22 at 18:41
  • Questions are not reproducible without **data**. This question needs a [SSCCE](http://sscce.org/). In the future, always provide a [mre] **with code, data, errors, current output, and expected output, as [formatted text](https://stackoverflow.com/help/formatting)**. If relevant, plot images are okay. If you don't include an mre, it is likely the question will be downvoted, closed, and deleted. – Trenton McKinney Jul 07 '22 at 19:19
  • To access the `axes` of the single facet in the catplot, use `ax = ax.axes[0, 0]` – Trenton McKinney Jul 07 '22 at 19:22

0 Answers0