0

I can either used this code

sns.catplot(x="x", y="y", data=df, palette="Set2",
            showmeans=True, hue="h", col="c", kind="box")

which allows me to use columns in my plot, or this code

sns.boxplot(x="x", y="y", data=df, palette="Set2",
            showmeans=True, hue="h",
            meanprops={"marker": "+",
                       "markeredgecolor": "black",
                       "markersize": "10"})

which allows me to edit the style of the mean markers. However, boxplot does not allow the argument col= and catplot does not allow meanprops=. Can't I have both?

Xafer
  • 1
  • 2
  • Why do you think `catplot` doesn't allow `meanprops=`? The [`catplot` docs](https://seaborn.pydata.org/generated/seaborn.catplot.html) write *"Other keyword arguments are passed through to the underlying plotting function."* Why do you write it with a `b` in the title (`props` is short for `properties`)? Which seaborn version are you using? – JohanC Feb 02 '22 at 11:45
  • Thank you for your valuable input! Indeed, I am obviously to stupid to check the correct spelling of all arguments. I misspelled "props" and did not notice it for the last three days my problem was driving me around. – Xafer Feb 02 '22 at 12:06

1 Answers1

0

Finally it worked. Here is the code in case it might help someone in the future:

g = sns.catplot(x="x", y="y", hue="h", col="c", data=df, palette="Set2",
            showmeans=True, kind="box",
            meanprops={"marker": "+",
                       "markeredgecolor": "black",
                       "markersize": "10"}
            )
Xafer
  • 1
  • 2