Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commitac42b94

Browse files
committed
Deprecate passing a string as *num* argument
1 parent60b95ab commitac42b94

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Deprecation in EngFormatter
2+
```````````````````````````
3+
4+
Passing a string as *num* argument when calling an instance of
5+
`matplotlib.ticker.EngFormatter` is deprecated and will be removed in 2.3.

‎lib/matplotlib/ticker.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,6 +1262,12 @@ def format_eng(self, num):
12621262
`num` may be a numeric value or a string that can be converted
12631263
to a numeric value with ``float(num)``.
12641264
"""
1265+
ifisinstance(num,six.string_types):
1266+
warnings.warn(
1267+
"Passing a string as *num* argument is deprecated since"
1268+
"Matplotlib 2.1, and is expected to be removed in 2.3.",
1269+
mplDeprecation)
1270+
12651271
dnum=float(num)
12661272
sign=1
12671273
fmt="g"ifself.placesisNoneelse".{:d}f".format(self.places)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp