8000 Merge pull request #1615 from mdboom/offset-empty · matplotlib/matplotlib@ccd48cb · GitHub
[go: up one dir, main page]

Skip to content

Commit ccd48cb

committed
Merge pull request #1615 from mdboom/offset-empty
Offset is empty with usetex when offset is equal to 1
2 parents 41fcfd2 + 969808b commit ccd48cb

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)
0