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

Proposed change to default log scale tick formatting #5161

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Aug 22, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
use _mathdefault in non-usetex mathtext
  • Loading branch information
zblz committed Aug 2, 2016
commit 4ce70e9116df710cfd6175fd2a8148bdc95f90ce
14 changes: 7 additions & 7 deletions 14 lib/matplotlib/ticker.py
Original file line number Diff line number Diff line change
Expand Up @@ -953,11 +953,11 @@ class LogFormatterMathtext(LogFormatter):

def _non_decade_format(self, sign_string, base, fx, usetex):
'Return string for non-decade locations'
if usetex:
return (r'$%s%s^{%.2f}$') % (sign_string, base, fx)
else:
return ('$%s$' % _mathdefault('%s%s^{%.2f}' %
(sign_string, base, fx)))
if usetex:
return (r'$%s%s^{%.2f}$') % (sign_string, base, fx)
else:
return ('$%s$' % _mathdefault('%s%s^{%.2f}' %
(sign_string, base, fx)))

def __call__(self, x, pos=None):
"""
Expand Down Expand Up @@ -1021,8 +1021,8 @@ def _non_decade_format(self, sign_string, base, fx, usetex):
return (r'$%g\times%s^{%d}$') % \
(coeff, base, exponent)
else:
return (r'$\mathdefault{%g\times%s^{%d}}$') % \
(coeff, base, exponent)
return ('$%s$' % _mathdefault(r'%g\times%s^{%d}' %
(coeff, base, exponent)))


class LogitFormatter(Formatter):
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.