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 ca26408

Browse filesBrowse files
committed
Remove duplicate canvas assignments.
These `self.canvas = canvas` are already being done by the base class init.
1 parent 415bd38 commit ca26408
Copy full SHA for ca26408

File tree

Expand file treeCollapse file tree

3 files changed

+0
-4
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+0
-4
lines changed

‎lib/matplotlib/backends/_backend_tk.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/_backend_tk.py
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,6 @@ def __init__(self, canvas, num, window):
412412
self.window = window
413413
self.window.withdraw()
414414
self.set_window_title("Figure %d" % num)
415-
self.canvas = canvas
416415
# If using toolmanager it has to be present when initializing the
417416
# toolbar
418417
self.toolmanager = self._get_toolmanager()
@@ -502,7 +501,6 @@ class NavigationToolbar2Tk(NavigationToolbar2, tk.Frame):
502501
``pack_toolbar=False``.
503502
"""
504503
def __init__(self, canvas, window, *, pack_toolbar=True):
505-
self.canvas = canvas
506504
# Avoid using self.window (prefer self.canvas.get_tk_widget().master),
507505
# so that Tool implementations can reuse the methods.
508506
self.window = window

‎lib/matplotlib/backends/backend_qt5.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_qt5.py
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,6 @@ class FigureManagerQT(FigureManagerBase):
516516

517517
def __init__(self, canvas, num):
518518
FigureManagerBase.__init__(self, canvas, num)
519-
self.canvas = canvas
520519
self.window = MainWindow()
521520
self.window.closing.connect(canvas.close_event)
522521
self.window.closing.connect(self._widgetclosed)

‎lib/matplotlib/backends/backend_wx.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_wx.py
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1110,7 +1110,6 @@ class NavigationToolbar2Wx(NavigationToolbar2, wx.ToolBar):
11101110
def __init__(self, canvas):
11111111
wx.ToolBar.__init__(self, canvas.GetParent(), -1)
11121112
NavigationToolbar2.__init__(self, canvas)
1113-
self.canvas = canvas
11141113
self._idle = True
11151114
self.prevZoomRect = None
11161115
# for now, use alternate zoom-rectangle drawing on all

0 commit comments

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