@@ -184,11 +184,16 @@ def draw(self, renderer):
184184 offsets = transOffset .transform_non_affine (offsets )
185185 transOffset = transOffset .get_affine ()
186186
187+ if self ._edgecolors == 'face' :
188+ edgecolors = self ._facecolors
189+ else :
190+ edgecolors = self ._edgecolors
191+
187192 renderer .draw_path_collection (
188193 transform .frozen (), self .clipbox , clippath , clippath_trans ,
189194 paths , self .get_transforms (),
190195 offsets , transOffset ,
191- self ._facecolors , self . _edgecolors , self ._linewidths ,
196+ self ._facecolors , edgecolors , self ._linewidths ,
192197 self ._linestyles , self ._antialiaseds )
193198 renderer .close_group (self .__class__ .__name__ )
194199
@@ -318,12 +323,18 @@ def set_edgecolor(self, c):
318323 Set the edgecolor(s) of the collection. *c* can be a
319324 matplotlib color arg (all patches have same color), or a
320325 sequence or rgba tuples; if it is a sequence the patches will
321- cycle through the sequence
326+ cycle through the sequence.
327+
328+ If *c* is 'face', the edge color will always be the same as
329+ the face color.
322330
323331 ACCEPTS: matplotlib color arg or sequence of rgba tuples
324332 """
325- if c is None : c = mpl .rcParams ['patch.edgecolor' ]
326- self ._edgecolors = _colors .colorConverter .to_rgba_array (c , self ._alpha )
333+ if c == 'face' :
334+ self ._edgecolors = 'face'
335+ else :
336+ if c is None : c = mpl .rcParams ['patch.edgecolor' ]
337+ self ._edgecolors = _colors .colorConverter .to_rgba_array (c , self ._alpha )
327338
328339 set_edgecolors = set_edgecolor
329340
0 commit comments