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

Skip to content

Commit 929ddcf

Browse files
committed
Fix PolygonSelector.clear()
1 parent f1a8b92 commit 929ddcf

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/matplotlib/widgets.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4177,6 +4177,12 @@ def verts(self, xys):
41774177
self._add_box()
41784178
self._draw_polygon()
41794179

4180+
def clear(self):
4181+
super().clear()
4182+
self._xys = [(0, 0)]
4183+
self.set_visible(True)
4184+
self._draw_polygon()
4185+
41804186

41814187
class Lasso(AxesWidget):
41824188
"""

0 commit comments

Comments
 (0)