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

Skip to content

Commit 969808b

Browse files
committed
Fix matplotlib#1615 -- offset is empty.
1 parent b3f676c commit 969808b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/ticker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ def _formatSciNotation(self, s):
581581
sign = tup[1][0].replace(positive_sign, '')
582582
exponent = tup[1][1:].lstrip('0')
583583
if self._useMathText or self._usetex:
584-
if significand == '1':
584+
if significand == '1' and exponent != '':
585585
# reformat 1x10^y as 10^y
586586
significand = ''
587587
if exponent:

0 commit comments

Comments
 (0)