8000 add LineCollection.set_alpha · matplotlib/matplotlib@655f243 · GitHub
[go: up one dir, main page]

Skip to content

Commit 655f243

Browse files
committed
add LineCollection.set_alpha
1 parent c14b5aa commit 655f243

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/matplotlib/collections.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -830,8 +830,6 @@ def set_alpha(self, alpha):
830830
artist.Artist._set_alpha_for_array(self, alpha)
831831
self._set_facecolor(self._original_facecolor)
832832
self._set_edgecolor(self._original_edgecolor)
833-
if self._gapcolor is not None:
834-
self.set_gapcolor(self._original_gapcolor)
835833

836834
set_alpha.__doc__ = artist.Artist._set_alpha_for_array.__doc__
837835

@@ -1474,6 +1472,11 @@ def _get_default_edgecolor(self):
14741472
def _get_default_facecolor(self):
14751473
return 'none'
14761474

1475+
def set_alpha(self, alpha):
1476+
# docstring inherited
1477+
super().set_alpha(alpha)
1478+
self.set_gapcolor(self._original_gapcolor)
1479+
14771480
def set_color(self, c):
14781481
"""
14791482
Set the edgecolor(s) of the LineCollection.

0 commit comments

Comments
 (0)
0