Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 895a3f5

Browse files
committed
ENH : add stale flag to EventCollection
1 parent 5c8f758 commit 895a3f5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/matplotlib/collections.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1006,7 +1006,6 @@ class LineCollection(Collection):
10061006
number of segments.
10071007
"""
10081008

1009-
10101009
def __init__(self, segments, # Can be None.
10111010
linewidths=None,
10121011
colors=None,
@@ -1118,6 +1117,7 @@ def set_segments(self, segments):
11181117
_segments = self._add_offsets(_segments)
11191118

11201119
self._paths = [mpath.Path(_seg) for _seg in _segments]
1120+
self.stale = True
11211121

11221122
set_verts = set_segments # for compatibility with PolyCollection
11231123
set_paths = set_segments
@@ -1155,9 +1155,11 @@ def set_color(self, c):
11551155
ACCEPTS: matplotlib color arg or sequence of rgba tuples
11561156
"""
11571157
self.set_edgecolor(c)
1158+
self.stale = True
11581159

11591160
def get_color(self):
11601161
return self._edgecolors
1162+
11611163
get_colors = get_color # for compatibility with old versions
11621164

11631165

@@ -1332,6 +1334,7 @@ def switch_orientation(self):
13321334
segments[i] = np.fliplr(segment)
13331335
self.set_segments(segments)
13341336
self._is_horizontal = not self.is_horizontal()
1337+
self.stale = True
13351338

13361339
def set_orientation(self, orientation=None):
13371340
'''

0 commit comments

Comments
 (0)