diff --git a/lib/matplotlib/widgets.py b/lib/matplotlib/widgets.py index f551abad778c..d31d109fa9de 100644 --- a/lib/matplotlib/widgets.py +++ b/lib/matplotlib/widgets.py @@ -2144,6 +2144,11 @@ def _press(self, event): # Clear previous rectangle before drawing new rectangle. self.update() + if not self.interactive: + x = event.xdata + y = event.ydata + self.extents = x, x, y, y + self.set_visible(self.visible) def _release(self, event):