Skip to content

Commit

Permalink
Fix deprecation warnings from self.visible and set_data(x, y)
Browse files Browse the repository at this point in the history
  • Loading branch information
dhomeier committed Jul 19, 2024
1 parent f88335e commit 5e162fb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/matplotlib/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -3629,7 +3629,7 @@ def extents(self, extents):
# Update displayed shape
self._draw_shape((corner_min[0], corner_max[0],
corner_min[1], corner_max[1]))
self.set_visible(self.visible)
self.set_visible(self.get_visible())
self.update()

@property
Expand Down Expand Up @@ -3692,7 +3692,7 @@ def _update_selection_artist(self):
def _update_handles(self):
self._corner_handles.set_data(*self.corners)
self._edge_handles.set_data(*self.edge_centers)
self._center_handle.set_data(*self.center)
self._center_handle.set_data(*self.center.reshape(-1, 1))

def _set_active_handle(self, event):
"""Set active handle based on the location of the mouse event."""
Expand Down Expand Up @@ -3781,7 +3781,7 @@ def _update_selection_artist(self):
# Update displayed handles
self._corner_handles.set_data(*self.corners)
self._edge_handles.set_data(*self.edge_centers)
self._center_handle.set_data(*self.center)
self._center_handle.set_data(*self.center.reshape(-1, 1))

self.update()

Expand Down

0 comments on commit 5e162fb

Please sign in to comment.