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

Appearance settings

Commit 4ce70e9

Browse filesBrowse files
committed
use _mathdefault in non-usetex mathtext
1 parent a6e954d commit 4ce70e9
Copy full SHA for 4ce70e9

File tree

Expand file treeCollapse file tree

1 file changed

+7
-7
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-7
lines changed

‎lib/matplotlib/ticker.py

Copy file name to clipboardExpand all lines: lib/matplotlib/ticker.py
+7-7Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -953,11 +953,11 @@ class LogFormatterMathtext(LogFormatter):
953953

954954
def _non_decade_format(self, sign_string, base, fx, usetex):
955955
'Return string for non-decade locations'
956-
if usetex:
957-
return (r'$%s%s^{%.2f}$') % (sign_string, base, fx)
958-
else:
959-
return ('$%s$' % _mathdefault('%s%s^{%.2f}' %
960-
(sign_string, base, fx)))
956+
if usetex:
957+
return (r'$%s%s^{%.2f}$') % (sign_string, base, fx)
958+
else:
959+
return ('$%s$' % _mathdefault('%s%s^{%.2f}' %
960+
(sign_string, base, fx)))
961961

962962
def __call__(self, x, pos=None):
963963
"""
@@ -1021,8 +1021,8 @@ def _non_decade_format(self, sign_string, base, fx, usetex):
10211021
return (r'$%g\times%s^{%d}$') % \
10221022
(coeff, base, exponent)
10231023
else:
1024-
return (r'$\mathdefault{%g\times%s^{%d}}$') % \
1025-
(coeff, base, exponent)
1024+
return ('$%s$' % _mathdefault(r'%g\times%s^{%d}' %
1025+
(coeff, base, exponent)))
10261026

10271027

10281028
class LogitFormatter(Formatter):

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.