8000 Deprecate NavigationToolbar2Tk.set_active. by anntzer · Pull Request #13711 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Deprecate NavigationToolbar2Tk.set_active. #13711

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions doc/api/next_api_changes/2019-03-19-AL.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Deprecations
````````````
``NavigationToolbar2Tk.set_active`` is deprecated, as it has no (observable)
effect.
7 changes: 3 additions & 4 deletions examples/user_interfaces/embedding_in_wx3_sgskip.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
This is yet another example of using matplotlib with wx. Hopefully
this is pretty full-featured:

- both matplotlib toolbar and WX buttons manipulate plot
- full wxApp framework, including widget interaction
- XRC (XML wxWidgets resource) file to create GUI (made with XRCed)
- both matplotlib toolbar and WX buttons manipulate plot
- full wxApp framework, including widget interaction
- XRC (XML wxWidgets resource) file to create GUI (made with XRCed)

This was derived from embedding_in_wx and dynamic_image_wxagg.

Expand Down Expand Up @@ -46,7 +46,6 @@ def __init__(self, parent):
self.canvas = FigureCanvas(self, -1, self.fig)
self.toolbar = NavigationToolbar(self.canvas) # matplotlib toolbar
self.toolbar.Realize()
# self.toolbar.set_active([0,1])

# Now put all into a sizer
sizer = wx.BoxSizer(wx.VERTICAL)
Expand Down
1 change: 1 addition & 0 deletions lib/matplotlib/backends/_backend_tk.py
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,7 @@ def save_figure(self, *args):
except Exception as e:
tkinter.messagebox.showerror("Error saving file", str(e))

@cbook.deprecated("3.1")
def set_active(self, ind):
self._ind = ind
self._active = [self._axes[i] for i in self._ind]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these attributes appear to be never accessed as well.

Expand Down
0