Skip to content

Commit

Permalink
Use rule-based default edgecolor closer to where it is defined
Browse files Browse the repository at this point in the history
  • Loading branch information
mwaskom committed Nov 4, 2023
1 parent 4b7f341 commit e9e28f6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions seaborn/categorical.py
Original file line number Diff line number Diff line change
Expand Up @@ -2831,7 +2831,8 @@ def catplot(
color = desaturate(color, saturation)

if kind in ["strip", "swarm"]:
edgecolor = p._complement_color(
kwargs = _normalize_kwargs(kwargs, mpl.collections.PathCollection)
kwargs["edgecolor"] = p._complement_color(
kwargs.pop("edgecolor", default), color, p._hue_map
)

Expand All @@ -2844,7 +2845,6 @@ def catplot(

jitter = kwargs.pop("jitter", True)
plot_kws = kwargs.copy()
plot_kws["edgecolor"] = edgecolor
plot_kws.setdefault("zorder", 3)
plot_kws.setdefault("linewidth", 0)
if "s" not in plot_kws:
Expand All @@ -2861,7 +2861,6 @@ def catplot(

warn_thresh = kwargs.pop("warn_thresh", .05)
plot_kws = kwargs.copy()
plot_kws["edgecolor"] = edgecolor
plot_kws.setdefault("zorder", 3)
if "s" not in plot_kws:
plot_kws["s"] = plot_kws.pop("size", 5) ** 2
Expand Down

0 comments on commit e9e28f6

Please sign in to comment.