@@ -788,18 +788,17 @@ def get_edgecolor(self):
788
788
else :
789
789
return self ._edgecolors
790
790
791
- def _set_edgecolor (self , c , default = None ):
791
+ def _get_default_edgecolor (self ):
792
+ return mpl .rcParams ['patch.edgecolor' ]
793
+
794
+ def _set_edgecolor (self , c ):
792
795
set_hatch_color = True
793
796
if c is None :
794
- if default is None :
795
- if (mpl .rcParams ['patch.force_edgecolor' ] or
796
- not self ._face_is_mapped or self ._edge_default ):
797
- c = mpl .rcParams ['patch.edgecolor' ]
798
- else :
799
- c = 'none'
800
- set_hatch_color = False
797
+ if (mpl .rcParams ['patch.force_edgecolor' ] or self ._edge_default ):
798
+ c = self ._get_default_edgecolor ()
801
799
else :
802
- c = default
800
+ c = 'none'
801
+ set_hatch_color = False
803
802
if isinstance (c , str ) and c == 'face' :
804
803
self ._edgecolors = 'face'
805
804
self .stale = True
@@ -809,7 +808,7 @@ def _set_edgecolor(self, c, default=None):
809
808
self ._hatch_color = tuple (self ._edgecolors [0 ])
810
809
self .stale = True
811
810
812
- def set_edgecolor (self , c , default = None ):
811
+ def set_edgecolor (self , c ):
813
812
"""
814
813
Set the edgecolor(s) of the collection.
815
814
@@ -825,7 +824,7 @@ def set_edgecolor(self, c, default=None):
825
824
if isinstance (c , str ) and c .lower () in ("none" , "face" ):
826
825
c = c .lower ()
827
826
self ._original_edgecolor = c
828
- self ._set_edgecolor (c , default = default )
827
+ self ._set_edgecolor (c )
829
828
830
829
def set_alpha (self , alpha ):
831
830
"""
@@ -1512,6 +1511,9 @@ def _add_offsets(self, segs):
1512
1511
segs [i ] = segs [i ] + offsets [io :io + 1 ]
1513
1512
return segs
1514
1513
1514
+ def _get_default_edgecolor (self ):
1515
+ return mpl .rcParams ['lines.color' ]
1516
+
1515
1517
def set_color (self , c ):
1516
1518
"""
1517
1519
Set the color(s) of the LineCollection.
@@ -1523,7 +1525,7 @@ def set_color(self, c):
1523
1525
sequence of rgba tuples; if it is a sequence the lines will
1524
1526
cycle through the sequence.
1525
1527
"""
1526
- self .set_edgecolor (c , default = mpl . rcParams [ 'lines.color' ] )
1528
+ self .set_edgecolor (c )
1527
1529
1528
1530
def get_color (self ):
1529
1531
return self ._edgecolors
0 commit comments