Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2b44037

Browse files
author
Phil Elson
committed
Ported fix from matplotlib#910
1 parent ae4a308 commit 2b44037

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/matplotlib/ticker.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ def _formatSciNotation(self, s):
523523
# transform 1e+004 into 1e4, for example
524524
if self._useLocale:
525525
decimal_point = locale.localeconv()['decimal_point']
526-
positive = locale.localeconv()['positive_sign']
526+
positive_sign = locale.localeconv()['positive_sign']
527527
else:
528528
decimal_point = '.'
529529
positive_sign = '+'
@@ -545,7 +545,7 @@ def _formatSciNotation(self, s):
545545
else:
546546
s = ('%se%s%s' %(significand, sign, exponent)).rstrip('e')
547547
return s
548-
except IndexError, msg:
548+
except IndexError:
549549
return s
550550

551551

@@ -809,7 +809,9 @@ def __call__(self):
809809
def raise_if_exceeds(self, locs):
810810
'raise a RuntimeError if Locator attempts to create more than MAXTICKS locs'
811811
if len(locs)>=self.MAXTICKS:
812-
raise RuntimeError('Locator attempting to generate %d ticks from %s to %s: exceeds Locator.MAXTICKS'%(len(locs), locs[0], locs[-1]))
812+
raise RuntimeError(('Locator attempting to generate %d ticks from '
813+
'%s to %s: exceeds Locator.MAXTICKS' %
814+
(len(locs), locs[0], locs[-1])))
813815

814816
return locs
815817

0 commit comments

Comments
 (0)