@@ -420,18 +420,19 @@ def draw(self, renderer):
420420 renderer .draw_path_collection (
421421 gc , transform .frozen (), ipaths ,
422422 self .get_transforms (), offsets , offset_trf ,
423- [mcolors .to_rgba ("none" )], self ._gapcolor , self . get_hatchcolor (),
423+ [mcolors .to_rgba ("none" )], self ._gapcolor ,
424424 self ._linewidths , ilinestyles ,
425425 self ._antialiaseds , self ._urls ,
426- "screen" )
426+ "screen" , self . get_hatchcolor () )
427427
428428 renderer .draw_path_collection (
429429 gc , transform .frozen (), paths ,
430430 self .get_transforms (), offsets , offset_trf ,
431- self .get_facecolor (), self .get_edgecolor (), self . get_hatchcolor (),
431+ self .get_facecolor (), self .get_edgecolor (),
432432 self ._linewidths , self ._linestyles ,
433433 self ._antialiaseds , self ._urls ,
434- "screen" ) # offset_position, kept for backcompat.
434+ "screen" , # offset_position, kept for backcompat
435+ self .get_hatchcolor ())
435436
436437 gc .restore ()
437438 renderer .close_group (self .__class__ .__name__ )
@@ -812,13 +813,13 @@ def _set_edgecolor(self, c):
812813 if cbook ._str_lower_equal (c , 'face' ):
813814 self ._edgecolors = 'face'
814815 if self ._original_hatchcolor is None :
815- self ._set_hatchcolor ('black' )
816+ self ._set_hatchcolor (mpl . rcParams [ 'patch.edgecolor' ] )
816817 self .stale = True
817818 return
818819 self ._edgecolors = mcolors .to_rgba_array (c , self ._alpha )
819820 if self ._original_hatchcolor is None :
820821 if isinstance (c , str ) and c == 'none' :
821- self ._set_hatchcolor ('black' )
822+ self ._set_hatchcolor (mpl . rcParams [ 'patch.edgecolor' ] )
822823 else :
823824 self ._hatchcolors = self ._edgecolors
824825 self .stale = True
@@ -846,11 +847,12 @@ def _set_hatchcolor(self, c):
846847 if c == "inherit" :
847848 if self ._original_edgecolor is not None :
848849 c = self ._original_edgecolor
850+ if isinstance (c , str ) and c in ('none' , 'face' ):
851+ c = mpl .rcParams ["patch.edgecolor" ]
849852 else :
850853 c = mpl .rcParams ["patch.edgecolor" ]
851-
852- if isinstance (c , str ) and c in ('none' , 'face' ):
853- c = 'black'
854+ else :
855+ self ._original_hatchcolor = c
854856
855857 self ._hatchcolors = mcolors .to_rgba_array (c , self ._alpha )
856858 self .stale = True
0 commit comments