Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8991f9f

Browse filesBrowse files
authored
Merge pull request #10838 from anntzer/publictk
DOC: Don't use private attribute in tk example. Fix Toolbar class rename.
2 parents f254b3b + c081f5a commit 8991f9f
Copy full SHA for 8991f9f

File tree

Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed

‎examples/user_interfaces/embedding_in_tk_sgskip.py

Copy file name to clipboardExpand all lines: examples/user_interfaces/embedding_in_tk_sgskip.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import tkinter
99

1010
from matplotlib.backends.backend_tkagg import (
11-
FigureCanvasTkAgg, NavigationToolbar2TkAgg)
11+
FigureCanvasTkAgg, NavigationToolbar2Tk)
1212
# Implement the default Matplotlib key bindings.
1313
from matplotlib.backend_bases import key_press_handler
1414
from matplotlib.figure import Figure
@@ -27,9 +27,9 @@
2727
canvas.draw()
2828
canvas.get_tk_widget().pack(side=tkinter.TOP, fill=tkinter.BOTH, expand=1)
2929

30-
toolbar = NavigationToolbar2TkAgg(canvas, root)
30+
toolbar = NavigationToolbar2Tk(canvas, root)
3131
toolbar.update()
32-
canvas._tkcanvas.pack(side=tkinter.TOP, fill=tkinter.BOTH, expand=1)
32+
canvas.get_tk_widget().pack(side=tkinter.TOP, fill=tkinter.BOTH, expand=1)
3333

3434

3535
def on_key_press(event):

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.