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

Skip to content

Commit f744e7c

Browse files
committed
Add handler for removing the rubberband when zoom is released
1 parent 6a74cda commit f744e7c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/matplotlib/backend_bases.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2763,6 +2763,10 @@ def draw_rubberband(self, event, x0, y0, x1, y1):
27632763
"""Draw a rectangle rubberband to indicate zoom limits"""
27642764
pass
27652765

2766+
def remove_rubberband(self):
2767+
"""Remove the rubberband"""
2768+
pass
2769+
27662770
def forward(self, *args):
27672771
"""Move forward in the view lim stack"""
27682772
self._views.forward()
@@ -3033,6 +3037,8 @@ def release_zoom(self, event):
30333037
self.canvas.mpl_disconnect(zoom_id)
30343038
self._ids_zoom = []
30353039

3040+
self.remove_rubberband()
3041+
30363042
if not self._xypress:
30373043
return
30383044

0 commit comments

Comments
 (0)