Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 300eefe commit e3ba6baCopy full SHA for e3ba6ba
1 file changed
lib/matplotlib/ticker.py
@@ -1268,9 +1268,8 @@ def format_eng(self, num):
1268
# Taking care of the cases like 999.9..., which may be rounded to 1000
1269
# instead of 1 k. Beware of the corner case of values that are beyond
1270
# the range of SI prefixes (i.e. > 'Y').
1271
- _fmant = float(format(mant, fmt))
1272
- if ((_fmant >= 1000 or _fmant <= -1000)
1273
- and pow10 < max(self.ENG_PREFIXES)):
+ if (abs(float(format(mant, fmt))) >= 1000
+ and pow10 < max(self.ENG_PREFIXES)):
1274
mant /= 1000
1275
pow10 += 3
1276
0 commit comments