@@ -267,7 +267,7 @@ def contains(self, mouseevent):
267
267
# the math involved in checking for containment (here and inside of segment_hits) assumes
268
268
# that it is OK to overflow. In case the application has set the error flags such that
269
269
# an exception is raised on overflow, we temporarily set the appropriate error flags here
270
- # and set them back when we are finished.
270
+ # and set them back when we are finished.
271
271
olderrflags = np .seterr (all = 'ignore' )
272
272
try :
273
273
# Check for collision
@@ -448,7 +448,7 @@ def recache(self, always=False):
448
448
def _transform_path (self , subslice = None ):
449
449
"""
450
450
Puts a TransformedPath instance at self._transformed_path,
451
- all invalidation of the transform is then handled by the
451
+ all invalidation of the transform is then handled by the
452
452
TransformedPath instance.
453
453
"""
454
454
# Masked arrays are now handled by the Path class itself
@@ -495,7 +495,7 @@ def draw(self, renderer):
495
495
x0 , x1 = self .axes .get_xbound ()
496
496
i0 , = self ._x .searchsorted ([x0 ], 'left' )
497
497
i1 , = self ._x .searchsorted ([x1 ], 'right' )
498
- subslice = slice (max (i0 - 1 , 0 ), i1 + 1 )
498
+ subslice = slice (max (i0 - 1 , 0 ), i1 + 1 )
499
499
self .ind_offset = subslice .start
500
500
self ._transform_path (subslice )
501
501
@@ -505,10 +505,13 @@ def draw(self, renderer):
505
505
gc = renderer .new_gc ()
506
506
self ._set_gc_clip (gc )
507
507
508
- gc .set_foreground (self ._color )
508
+ ln_color_rgba = self ._get_rgba_ln_color ()
509
+ gc .set_foreground (ln_color_rgba )
510
+ gc .set_alpha (ln_color_rgba [3 ])
511
+
509
512
gc .set_antialiased (self ._antialiased )
510
513
gc .set_linewidth (self ._linewidth )
511
- gc . set_alpha ( self . _alpha )
514
+
512
515
if self .is_dashed ():
513
516
cap = self ._dashcapstyle
514
517
join = self ._dashjoinstyle
@@ -540,7 +543,7 @@ def draw(self, renderer):
540
543
else :
541
544
gc .set_foreground (edgecolor )
542
545
gc .set_linewidth (self ._markeredgewidth )
543
- gc . set_alpha ( self . _alpha )
546
+
544
547
marker = self ._marker
545
548
tpath , affine = transformed_path .get_transformed_points_and_affine ()
546
549
if len (tpath .vertices ):
@@ -956,7 +959,6 @@ def update_from(self, other):
956
959
other ._marker .get_fillstyle ())
957
960
self ._drawstyle = other ._drawstyle
958
961
959
-
960
962
def _get_rgb_face (self , alt = False ):
961
963
facecolor = self ._get_markerfacecolor (alt = alt )
962
964
if is_string_like (facecolor ) and facecolor .lower () == 'none' :
@@ -970,9 +972,17 @@ def _get_rgba_face(self, alt=False):
970
972
if is_string_like (facecolor ) and facecolor .lower () == 'none' :
971
973
rgbaFace = None
972
974
else :
973
- rgbaFace = colorConverter .to_rgba (facecolor )
975
+ rgbaFace = colorConverter .to_rgba (facecolor , self . _alpha )
974
976
return rgbaFace
975
977
978
+ def _get_rgba_ln_color (self , alt = False ):
979
+ ln_color = self ._color
980
+ if is_string_like (ln_color ) and ln_color .lower () == 'none' :
981
+ rgba_ln = None
982
+ else :
983
+ rgba_ln = colorConverter .to_rgba (ln_color , self ._alpha )
984
+ return rgba_ln
985
+
976
986
# some aliases....
977
987
def set_aa (self , val ):
978
988
'alias for set_antialiased'
0 commit comments