@@ -420,18 +420,19 @@ def draw(self, renderer):
420
420
renderer .draw_path_collection (
421
421
gc , transform .frozen (), ipaths ,
422
422
self .get_transforms (), offsets , offset_trf ,
423
- [mcolors .to_rgba ("none" )], self ._gapcolor , self . get_hatchcolor (),
423
+ [mcolors .to_rgba ("none" )], self ._gapcolor ,
424
424
self ._linewidths , ilinestyles ,
425
425
self ._antialiaseds , self ._urls ,
426
- "screen" )
426
+ "screen" , self . get_hatchcolor () )
427
427
428
428
renderer .draw_path_collection (
429
429
gc , transform .frozen (), paths ,
430
430
self .get_transforms (), offsets , offset_trf ,
431
- self .get_facecolor (), self .get_edgecolor (), self . get_hatchcolor (),
431
+ self .get_facecolor (), self .get_edgecolor (),
432
432
self ._linewidths , self ._linestyles ,
433
433
self ._antialiaseds , self ._urls ,
434
- "screen" ) # offset_position, kept for backcompat.
434
+ "screen" , # offset_position, kept for backcompat
435
+ self .get_hatchcolor ())
435
436
436
437
gc .restore ()
437
438
renderer .close_group (self .__class__ .__name__ )
@@ -812,13 +813,13 @@ def _set_edgecolor(self, c):
812
813
if cbook ._str_lower_equal (c , 'face' ):
813
814
self ._edgecolors = 'face'
814
815
if self ._original_hatchcolor is None :
815
- self ._set_hatchcolor ('black' )
816
+ self ._set_hatchcolor (mpl . rcParams [ 'patch.edgecolor' ] )
816
817
self .stale = True
817
818
return
818
819
self ._edgecolors = mcolors .to_rgba_array (c , self ._alpha )
819
820
if self ._original_hatchcolor is None :
820
821
if isinstance (c , str ) and c == 'none' :
821
- self ._set_hatchcolor ('black' )
822
+ self ._set_hatchcolor (mpl . rcParams [ 'patch.edgecolor' ] )
822
823
else :
823
824
self ._hatchcolors = self ._edgecolors
824
825
self .stale = True
@@ -846,11 +847,12 @@ def _set_hatchcolor(self, c):
846
847
if c == "inherit" :
847
848
if self ._original_edgecolor is not None :
848
849
c = self ._original_edgecolor
850
+ if isinstance (c , str ) and c in ('none' , 'face' ):
851
+ c = mpl .rcParams ["patch.edgecolor" ]
849
852
else :
850
853
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
854
856
855
857
self ._hatchcolors = mcolors .to_rgba_array (c , self ._alpha )
856
858
self .stale = True
0 commit comments