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 58cc484

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

File tree

Expand file treeCollapse file tree

3 files changed

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

3 files changed

+15
-4
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
@@ -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

Copy file name to clipboardExpand all lines: lib/matplotlib/rcsetup.py
+11-3Lines changed: 11 additions & 3 deletions
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

Copy file name to clipboardExpand all lines: matplotlibrc.template
+1-1Lines changed: 1 addition & 1 deletion
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.