Skip to content

Commit fa5cb4d

Browse files
committed
ENH : add stale flag to EventCollection
1 parent 729ada7 commit fa5cb4d

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
@@ -1027,7 +1027,6 @@ class LineCollection(Collection):
10271027
number of segments.
10281028
"""
10291029

1030-
10311030
def __init__(self, segments, # Can be None.
10321031
linewidths=None,
10331032
colors=None,
@@ -1139,6 +1138,7 @@ def set_segments(self, segments):
11391138
_segments = self._add_offsets(_segments)
11401139

11411140
self._paths = [mpath.Path(_seg) for _seg in _segments]
1141+
self.stale = True
11421142

11431143
set_verts = set_segments # for compatibility with PolyCollection
11441144
set_paths = set_segments
@@ -1176,9 +1176,11 @@ def set_color(self, c):
11761176
ACCEPTS: matplotlib color arg or sequence of rgba tuples
11771177
"""
11781178
self.set_edgecolor(c)
1179+
self.stale = True
11791180

11801181
def get_color(self):
11811182
return self._edgecolors
1183+
11821184
get_colors = get_color # for compatibility with old versions
11831185

11841186

@@ -1353,6 +1355,7 @@ def switch_orientation(self):
13531355
segments[i] = np.fliplr(segment)
13541356
self.set_segments(segments)
13551357
self._is_horizontal = not self.is_horizontal()
1358+
self.stale = True
13561359

13571360
def set_orientation(self, orientation=None):
13581361
'''

0 commit comments

Comments
 (0)