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 30c1683

Browse filesBrowse files
committed
house keeping for #2629
Added NavigationToolbar2QTAgg back with a deprecation warning Added entry to api_changes.rst
1 parent 1cf39cf commit 30c1683
Copy full SHA for 30c1683

File tree

Expand file treeCollapse file tree

2 files changed

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

2 files changed

+15
-0
lines changed

‎doc/api/api_changes.rst

Copy file name to clipboardExpand all lines: doc/api/api_changes.rst
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,9 @@ original location:
116116
* The ``fmt`` argument of :meth:`~matplotlib.axes.Axes.plot_date` has been
117117
changed from ``bo`` to just ``o``, so color cycling can happen by default.
118118

119+
* Removed the class `FigureManagerQTAgg` and deprecated `NavigationToolbar2QTAgg`
120+
which will be removed in 1.5.
121+
119122
.. _changes_in_1_3:
120123

121124

‎lib/matplotlib/backends/backend_qt4agg.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_qt4agg.py
+12Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import os # not used
1010
import sys
1111
import ctypes
12+
import warnings
1213

1314
import matplotlib
1415
from matplotlib.figure import Figure
@@ -24,6 +25,7 @@
2425
from .backend_qt4 import draw_if_interactive
2526
from .backend_qt4 import backend_version
2627
######
28+
from matplotlib.cbook import mplDeprecation
2729

2830
DEBUG = False
2931

@@ -168,5 +170,15 @@ def print_figure(self, *args, **kwargs):
168170
self.draw()
169171

170172

173+
class NavigationToolbar2QTAgg(NavigationToolbar2QT):
174+
def __init__(*args, **kwargs):
175+
warnings.warn('This class has been depreciated in 1.4 ' +
176+
'as it has no additional functionality over ' +
177+
'`NavigationToolbar2QT`. Please change your code to '
178+
'use `NavigationToolbar2QT` instead',
179+
mplDeprecation)
180+
NavigationToolbar2QT.__init__(*args, **kwargs)
181+
182+
171183
FigureCanvas = FigureCanvasQTAgg
172184
FigureManager = FigureManagerQT

0 commit comments

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