There was an error while loading. Please reload this page.
1 parent 8606bd4 commit 6e3f43fCopy full SHA for 6e3f43f
2 files changed
doc/api/next_api_changes/deprecations/20620-ES.rst
@@ -0,0 +1,4 @@
1
+``NavigationToolbar2.set_cursor``
2
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3
+Instead, use the `.FigureCanvasBase.set_cursor` method on the canvas (available
4
+as the ``canvas`` attribute on the toolbar or the Figure.)
lib/matplotlib/backend_bases.py
@@ -2882,9 +2882,6 @@ class NavigationToolbar2:
2882
:meth:`save_figure`
2883
save the current figure
2884
2885
- :meth:`set_cursor`
2886
- if you want the pointer icon to change
2887
-
2888
:meth:`draw_rubberband` (optional)
2889
draw the zoom to rect "rubberband" rectangle
2890
@@ -3248,6 +3245,7 @@ def save_figure(self, *args):
3248
3245
"""Save the current figure."""
3249
3246
raise NotImplementedError
3250
3247
+ @_api.deprecated("3.5", alternative="canvas.set_cursor")
3251
def set_cursor(self, cursor):
3252
"""
3253
Set the current cursor to one of the :class:`Cursors` enums values.
@@ -3257,6 +3255,7 @@ def set_cursor(self, cursor):
3257
3255
called e.g. before a long-running task during which the GUI is not
3258
3256
updated.
3259
+ self.canvas.set_cursor(cursor)
3260
3261
def update(self):
3262
"""Reset the axes stack."""
0 commit comments