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 b1ee8b2

Browse filesBrowse files
committed
backend_qt4agg and qt4: remove redundant classes, unused method. Closes #1151.
1 parent b6a0c7e commit b1ee8b2
Copy full SHA for b1ee8b2

File tree

Expand file treeCollapse file tree

2 files changed

+2
-20
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+2
-20
lines changed

‎lib/matplotlib/backends/backend_qt4.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_qt4.py
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -683,9 +683,6 @@ def configure_subplots(self):
683683
dia.setWindowIcon(QtGui.QIcon(image))
684684
dia.exec_()
685685

686-
def _get_canvas(self, fig):
687-
return FigureCanvasQT(fig)
688-
689686
def save_figure(self, *args):
690687
filetypes = self.canvas.get_supported_filetypes_grouped()
691688
sorted_filetypes = list(six.iteritems(filetypes))

‎lib/matplotlib/backends/backend_qt4agg.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_qt4agg.py
+2-17Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -51,22 +51,6 @@ def new_figure_manager_given_figure(num, figure):
5151
return FigureManagerQT(canvas, num)
5252

5353

54-
class NavigationToolbar2QTAgg(NavigationToolbar2QT):
55-
def _get_canvas(self, fig):
56-
return FigureCanvasQTAgg(fig)
57-
58-
59-
class FigureManagerQTAgg(FigureManagerQT):
60-
def _get_toolbar(self, canvas, parent):
61-
# must be inited after the window, drawingArea and figure
62-
# attrs are set
63-
if matplotlib.rcParams['toolbar'] == 'toolbar2':
64-
toolbar = NavigationToolbar2QTAgg(canvas, parent)
65-
else:
66-
toolbar = None
67-
return toolbar
68-
69-
7054
class FigureCanvasQTAgg(FigureCanvasQT, FigureCanvasAgg):
7155
"""
7256
The canvas the figure renders into. Calls the draw and print fig
@@ -183,5 +167,6 @@ def print_figure(self, *args, **kwargs):
183167
FigureCanvasAgg.print_figure(self, *args, **kwargs)
184168
self.draw()
185169

170+
186171
FigureCanvas = FigureCanvasQTAgg
187-
FigureManager = FigureManagerQTAgg
172+
FigureManager = FigureManagerQT

0 commit comments

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