@@ -7273,15 +7273,26 @@ def hist(self, x, bins=None, range=None, density=False, weights=None,
72737273 labels = [] if label is None else np .atleast_1d (np .asarray (label , str ))
72747274
72757275 if histtype == "step" :
7276- edgecolors = itertools .cycle (np .atleast_1d (kwargs .get ('edgecolor' ,
7277- colors )))
7276+ ec = kwargs .get ('edgecolor' , colors )
72787277 else :
7279- edgecolors = itertools .cycle (np .atleast_1d (kwargs .get ("edgecolor" , None )))
7278+ ec = kwargs .get ('edgecolor' , None )
7279+ if ec is None or cbook ._str_lower_equal (ec , 'none' ):
7280+ edgecolors = itertools .repeat (ec )
7281+ else :
7282+ edgecolors = itertools .cycle (mcolors .to_rgba_array (ec ))
7283+
7284+ fc = kwargs .get ('facecolor' , colors )
7285+ if cbook ._str_lower_equal (fc , 'none' ):
7286+ facecolors = itertools .repeat (fc )
7287+ else :
7288+ facecolors = itertools .cycle (mcolors .to_rgba_array (fc ))
72807289
7281- facecolors = itertools .cycle (np .atleast_1d (kwargs .get ('facecolor' , colors )))
72827290 hatches = itertools .cycle (np .atleast_1d (kwargs .get ('hatch' , None )))
72837291 linewidths = itertools .cycle (np .atleast_1d (kwargs .get ('linewidth' , None )))
7284- linestyles = itertools .cycle (np .atleast_1d (kwargs .get ('linestyle' , None )))
7292+ if 'linestyle' in kwargs :
7293+ linestyles = itertools .cycle (mlines ._get_dash_patterns (kwargs ['linestyle' ]))
7294+ else :
7295+ linestyles = itertools .repeat (None )
72857296
72867297 for patch , lbl in itertools .zip_longest (patches , labels ):
72877298 if not patch :
0 commit comments