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

Skip to content

Commit 7baa2b8

Browse files
authored
Merge pull request #25554 from anntzer/pv
Remove unused private SpanSelector._pressv and ._prev.
2 parents 2ce4e5c + 8011258 commit 7baa2b8

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

lib/matplotlib/widgets.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2651,10 +2651,6 @@ def __init__(self, ax, onselect, direction, minspan=0, useblit=False,
26512651
self._extents_on_press = None
26522652
self.snap_values = snap_values
26532653

2654-
# self._pressv is deprecated and we don't use it internally anymore
2655-
# but we maintain it until it is removed
2656-
self._pressv = None
2657-
26582654
self.onmove_callback = onmove_callback
26592655
self.minspan = minspan
26602656

@@ -2679,9 +2675,6 @@ def __init__(self, ax, onselect, direction, minspan=0, useblit=False,
26792675

26802676
self._active_handle = None
26812677

2682-
# prev attribute is deprecated but we still need to maintain it
2683-
self._prev = (0, 0)
2684-
26852678
def new_axes(self, ax, *, _props=None):
26862679
"""Set SpanSelector to operate on a new Axes."""
26872680
self.ax = ax
@@ -2758,10 +2751,6 @@ def _press(self, event):
27582751
self.update()
27592752

27602753
v = event.xdata if self.direction == 'horizontal' else event.ydata
2761-
# self._pressv and self._prev are deprecated but we still need to
2762-
# maintain them
2763-
self._pressv = v
2764-
self._prev = self._get_data(event)
27652754

27662755
if self._active_handle is None and not self.ignore_event_outside:
27672756
# when the press event outside the span, we initially set the
@@ -2801,8 +2790,6 @@ def direction(self, direction):
28012790
def _release(self, event):
28022791
"""Button release event handler."""
28032792
self._set_cursor(False)
2804-
# self._pressv is deprecated but we still need to maintain it
2805-
self._pressv = None
28062793

28072794
if not self._interactive:
28082795
self._selection_artist.set_visible(False)
@@ -2849,9 +2836,6 @@ def _hover(self, event):
28492836
def _onmove(self, event):
28502837
"""Motion notify event handler."""
28512838

2852-
# self._prev are deprecated but we still need to maintain it
2853-
self._prev = self._get_data(event)
2854-
28552839
v = event.xdata if self.direction == 'horizontal' else event.ydata
28562840
if self.direction == 'horizontal':
28572841
vpress = self._eventpress.xdata

0 commit comments

Comments
 (0)