Skip to content

Commit 4b7f341

Browse files
committed
Fix edgecolor in catplot with kind='bar'
Fixes #3542
1 parent 3351a17 commit 4b7f341

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

seaborn/categorical.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -2830,7 +2830,10 @@ def catplot(
28302830
if saturation < 1:
28312831
color = desaturate(color, saturation)
28322832

2833-
edgecolor = p._complement_color(kwargs.pop("edgecolor", default), color, p._hue_map)
2833+
if kind in ["strip", "swarm"]:
2834+
edgecolor = p._complement_color(
2835+
kwargs.pop("edgecolor", default), color, p._hue_map
2836+
)
28342837

28352838
width = kwargs.pop("width", 0.8)
28362839
dodge = kwargs.pop("dodge", False if kind in undodged_kinds else "auto")

tests/test_categorical.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2307,7 +2307,7 @@ def test_err_kws(self, fill):
23072307
dict(data="long", x="a", y="y", errorbar=("pi", 50)),
23082308
dict(data="long", x="a", y="y", errorbar=None),
23092309
dict(data="long", x="a", y="y", capsize=.3, err_kws=dict(c="k")),
2310-
dict(data="long", x="a", y="y", color="blue", ec="green", alpha=.5),
2310+
dict(data="long", x="a", y="y", color="blue", edgecolor="green", alpha=.5),
23112311
]
23122312
)
23132313
def test_vs_catplot(self, long_df, wide_df, null_df, flat_series, kwargs):

0 commit comments

Comments
 (0)