Skip to content

Commit 947e6eb

Browse files
authored
Merge pull request #5161 from zblz/log-ticks
API: Changes to default log scale tick formatting
2 parents 22aa800 + 5c28e95 commit 947e6eb

File tree

6 files changed

+333
-101
lines changed

6 files changed

+333
-101
lines changed

lib/matplotlib/scale.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
from matplotlib.cbook import dedent
1010
from matplotlib.ticker import (NullFormatter, ScalarFormatter,
11-
LogFormatterMathtext, LogitFormatter)
11+
LogFormatterSciNotation, LogitFormatter)
1212
from matplotlib.ticker import (NullLocator, LogLocator, AutoLocator,
1313
SymmetricalLogLocator, LogitLocator)
1414
from matplotlib.transforms import Transform, IdentityTransform
@@ -304,9 +304,9 @@ def set_default_locators_and_formatters(self, axis):
304304
log scaling.
305305
"""
306306
axis.set_major_locator(LogLocator(self.base))
307-
axis.set_major_formatter(LogFormatterMathtext(self.base))
307+
axis.set_major_formatter(LogFormatterSciNotation(self.base))
308308
axis.set_minor_locator(LogLocator(self.base, self.subs))
309-
axis.set_minor_formatter(NullFormatter())
309+
axis.set_minor_formatter(LogFormatterSciNotation(self.base))
310310

311311
def get_transform(self):
312312
"""
@@ -462,7 +462,7 @@ def set_default_locators_and_formatters(self, axis):
462462
symmetrical log scaling.
463463
"""
464464
axis.set_major_locator(SymmetricalLogLocator(self.get_transform()))
465-
axis.set_major_formatter(LogFormatterMathtext(self.base))
465+
axis.set_major_formatter(LogFormatterSciNotation(self.base))
466466
axis.set_minor_locator(SymmetricalLogLocator(self.get_transform(),
467467
self.subs))
468468
axis.set_minor_formatter(NullFormatter())
Binary file not shown.
3.2 KB
Loading

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy