Skip to content

Commit 58cc484

Browse files
committed
Merge pull request matplotlib#1388 from efiring/deprecate_Toolbar
Deprecate original NavigationToolbar
2 parents 02c1d41 + 8ff5030 commit 58cc484

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

doc/api/api_changes.rst

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ For new features that were added to matplotlib, please see
1414
Changes in 1.2.x
1515
================
1616

17+
* The ``classic`` option of the rc parameter ``toolbar`` is deprecated
18+
and will be removed in the next release.
19+
1720
* The :meth:`~matplotlib.cbook.isvector` method has been removed since it
1821
is no longer functional.
1922

lib/matplotlib/rcsetup.py

+11-3
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,17 @@ def validate_backend(s):
110110

111111
validate_qt4 = ValidateInStrings('backend.qt4', ['PyQt4', 'PySide'])
112112

113-
validate_toolbar = ValidateInStrings('toolbar',[
114-
'None','classic','toolbar2',
115-
], ignorecase=True)
113+
def validate_toolbar(s):
114+
validator = ValidateInStrings(
115+
'toolbar',
116+
['None','classic','toolbar2'],
117+
ignorecase=True)
118+
s = validator(s)
119+
if s.lower == 'classic':
120+
warnings.warn("'classic' Navigation Toolbar "
121+
"is deprecated in v1.2.x and will be "
122+
"removed in v1.3")
123+
return s
116124

117125
def validate_maskedarray(v):
118126
# 2008/12/12: start warning; later, remove all traces of maskedarray

matplotlibrc.template

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ backend : %(backend)s
4747
#backend_fallback: True
4848

4949
#interactive : False
50-
#toolbar : toolbar2 # None | classic | toolbar2
50+
#toolbar : toolbar2 # None | toolbar2 ("classic" is deprecated)
5151
#timezone : UTC # a pytz timezone string, eg US/Central or Europe/Paris
5252

5353
# Where your matplotlib data lives if you installed to a non-default

0 commit comments

Comments
 (0)