Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d9839d4 commit a7c4e9fCopy full SHA for a7c4e9f
1 file changed
examples/event_handling/poly_editor.py
@@ -114,9 +114,8 @@ def key_press_callback(self, event):
114
elif event.key == 'd':
115
ind = self.get_ind_under_point(event)
116
if ind is not None:
117
- self.poly.xy = [tup
118
- for i, tup in enumerate(self.poly.xy)
119
- if i != ind]
+ self.poly.xy = np.delete(self.poly.xy,
+ ind, axis=0)
120
self.line.set_data(zip(*self.poly.xy))
121
elif event.key == 'i':
122
xys = self.poly.get_transform().transform(self.poly.xy)
0 commit comments