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

Skip to content

Commit 55b45cc

Browse files
committed
Use minor ticks for symlog scale by default
1 parent fbb1a50 commit 55b45cc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/matplotlib/scale.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ class SymmetricalLogScale(ScaleBase):
440440
"""
441441
name = 'symlog'
442442

443-
def __init__(self, axis, *, base=10, linthresh=2, subs=None, linscale=1):
443+
def __init__(self, axis, *, base=10, linthresh=2, subs='auto', linscale=1):
444444
self._transform = SymmetricalLogTransform(base, linthresh, linscale)
445445
self.subs = subs
446446

@@ -454,7 +454,9 @@ def set_default_locators_and_formatters(self, axis):
454454
axis.set_major_formatter(LogFormatterSciNotation(self.base))
455455
axis.set_minor_locator(SymmetricalLogLocator(self.get_transform(),
456456
self.subs))
457-
axis.set_minor_formatter(NullFormatter())
457+
axis.set_minor_formatter(
458+
LogFormatterSciNotation(self.base,
459+
labelOnlyBase=(self.subs != 'auto')))
458460

459461
def get_transform(self):
460462
"""Return the `.SymmetricalLogTransform` associated with this scale."""

0 commit comments

Comments
 (0)