@@ -170,10 +170,10 @@ def __init__(self,
170
170
# list of unbroadcast/scaled linewidths
171
171
self ._us_lw = [0 ]
172
172
self ._linewidths = [0 ]
173
- # Flags: do colors come from mapping an array?
173
+ # Flags set by _set_mappable_flags: are colors from mapping an array?
174
174
self ._face_is_mapped = None
175
175
self ._edge_is_mapped = None
176
- self ._mapped_colors = None # Calculated in update_scalarmappable
176
+ self ._mapped_colors = None # calculated in update_scalarmappable
177
177
self ._hatch_color = mcolors .to_rgba (mpl .rcParams ['hatch.color' ])
178
178
self .set_facecolor (facecolors )
179
179
self .set_edgecolor (edgecolors )
@@ -736,10 +736,13 @@ def set_antialiased(self, aa):
736
736
aa : bool or list of bools
737
737
"""
738
738
if aa is None :
739
- aa = mpl . rcParams [ 'patch.antialiased' ]
739
+ aa = self . _get_default_antialiased ()
740
740
self ._antialiaseds = np .atleast_1d (np .asarray (aa , bool ))
741
741
self .stale = True
742
742
743
+ def _get_default_antialiased (self ):
744
+ return mpl .rcParams ['patch.antialiased' ]
745
+
743
746
def set_color (self , c ):
744
747
"""
745
748
Set both the edgecolor and the facecolor.
@@ -868,11 +871,14 @@ def _set_mappable_flags(self):
868
871
869
872
Returns
870
873
-------
871
- mapping_change: bool
874
+ mapping_change : bool
872
875
True if either flag is True, or if a flag has changed.
873
876
"""
877
+ # The flags are initialized to None to ensure this returns True
878
+ # the first time it is called.
874
879
edge0 = self ._edge_is_mapped
875
880
face0 = self ._face_is_mapped
881
+ # After returning, the flags must be Booleans, not None.
876
882
self ._edge_is_mapped = False
877
883
self ._face_is_mapped = False
878
884
if self ._A is not None :
@@ -1506,6 +1512,9 @@ def _add_offsets(self, segs):
1506
1512
def _get_default_linewidth (self ):
1507
1513
return mpl .rcParams ['lines.linewidth' ]
1508
1514
1515
+ def _get_default_antialiased (self ):
1516
+ return mpl .rcParams ['lines.antialiased' ]
1517
+
1509
1518
def _get_default_edgecolor (self ):
1510
1519
return mpl .rcParams ['lines.color' ]
1511
1520
0 commit comments