88import pandas as pd
99
1010import matplotlib as mpl
11+ from matplotlib .cbook import normalize_kwargs
1112from matplotlib .collections import PatchCollection
13+ from matplotlib .markers import MarkerStyle
1214from matplotlib .patches import Rectangle
1315import matplotlib .pyplot as plt
1416
2325 _default_color ,
2426 _get_patch_legend_artist ,
2527 _get_transform_functions ,
26- _normalize_kwargs ,
2728 _scatter_legend_artist ,
2829 _version_predates ,
2930)
30- from seaborn ._compat import MarkerStyle
3131from seaborn ._statistics import (
3232 EstimateAggregator ,
3333 LetterValues ,
@@ -605,7 +605,7 @@ def plot_boxes(
605605 value_var = {"x" : "y" , "y" : "x" }[self .orient ]
606606
607607 def get_props (element , artist = mpl .lines .Line2D ):
608- return _normalize_kwargs (plot_kws .pop (f"{ element } props" , {}), artist )
608+ return normalize_kwargs (plot_kws .pop (f"{ element } props" , {}), artist )
609609
610610 if not fill and linewidth is None :
611611 linewidth = mpl .rcParams ["lines.linewidth" ]
@@ -1175,7 +1175,7 @@ def plot_points(
11751175 agg_var = {"x" : "y" , "y" : "x" }[self .orient ]
11761176 iter_vars = ["hue" ]
11771177
1178- plot_kws = _normalize_kwargs (plot_kws , mpl .lines .Line2D )
1178+ plot_kws = normalize_kwargs (plot_kws , mpl .lines .Line2D )
11791179 plot_kws .setdefault ("linewidth" , mpl .rcParams ["lines.linewidth" ] * 1.8 )
11801180 plot_kws .setdefault ("markeredgewidth" , plot_kws ["linewidth" ] * 0.75 )
11811181 plot_kws .setdefault ("markersize" , plot_kws ["linewidth" ] * np .sqrt (2 * np .pi ))
@@ -2371,7 +2371,7 @@ def barplot(
23712371
23722372 agg_cls = WeightedAggregator if "weight" in p .plot_data else EstimateAggregator
23732373 aggregator = agg_cls (estimator , errorbar , n_boot = n_boot , seed = seed )
2374- err_kws = {} if err_kws is None else _normalize_kwargs (err_kws , mpl .lines .Line2D )
2374+ err_kws = {} if err_kws is None else normalize_kwargs (err_kws , mpl .lines .Line2D )
23752375
23762376 # Deprecations to remove in v0.15.0.
23772377 err_kws , capsize = p ._err_kws_backcompat (err_kws , errcolor , errwidth , capsize )
@@ -2506,7 +2506,7 @@ def pointplot(
25062506
25072507 agg_cls = WeightedAggregator if "weight" in p .plot_data else EstimateAggregator
25082508 aggregator = agg_cls (estimator , errorbar , n_boot = n_boot , seed = seed )
2509- err_kws = {} if err_kws is None else _normalize_kwargs (err_kws , mpl .lines .Line2D )
2509+ err_kws = {} if err_kws is None else normalize_kwargs (err_kws , mpl .lines .Line2D )
25102510
25112511 # Deprecations to remove in v0.15.0.
25122512 p ._point_kwargs_backcompat (scale , join , kwargs )
@@ -2848,7 +2848,7 @@ def catplot(
28482848 color = desaturate (color , saturation )
28492849
28502850 if kind in ["strip" , "swarm" ]:
2851- kwargs = _normalize_kwargs (kwargs , mpl .collections .PathCollection )
2851+ kwargs = normalize_kwargs (kwargs , mpl .collections .PathCollection )
28522852 kwargs ["edgecolor" ] = p ._complement_color (
28532853 kwargs .pop ("edgecolor" , default ), color , p ._hue_map
28542854 )
@@ -3023,14 +3023,14 @@ def catplot(
30233023 # Deprecations to remove in v0.15.0.
30243024 # TODO Uncomment when removing deprecation backcompat
30253025 # capsize = kwargs.pop("capsize", 0)
3026- # err_kws = _normalize_kwargs (kwargs.pop("err_kws", {}), mpl.lines.Line2D)
3026+ # err_kws = normalize_kwargs (kwargs.pop("err_kws", {}), mpl.lines.Line2D)
30273027 p ._point_kwargs_backcompat (
30283028 kwargs .pop ("scale" , deprecated ),
30293029 kwargs .pop ("join" , deprecated ),
30303030 kwargs
30313031 )
30323032 err_kws , capsize = p ._err_kws_backcompat (
3033- _normalize_kwargs (kwargs .pop ("err_kws" , {}), mpl .lines .Line2D ),
3033+ normalize_kwargs (kwargs .pop ("err_kws" , {}), mpl .lines .Line2D ),
30343034 None ,
30353035 errwidth = kwargs .pop ("errwidth" , deprecated ),
30363036 capsize = kwargs .pop ("capsize" , 0 ),
@@ -3052,7 +3052,7 @@ def catplot(
30523052 aggregator = agg_cls (estimator , errorbar , n_boot = n_boot , seed = seed )
30533053
30543054 err_kws , capsize = p ._err_kws_backcompat (
3055- _normalize_kwargs (kwargs .pop ("err_kws" , {}), mpl .lines .Line2D ),
3055+ normalize_kwargs (kwargs .pop ("err_kws" , {}), mpl .lines .Line2D ),
30563056 errcolor = kwargs .pop ("errcolor" , deprecated ),
30573057 errwidth = kwargs .pop ("errwidth" , deprecated ),
30583058 capsize = kwargs .pop ("capsize" , 0 ),
0 commit comments