Skip to content

Commit 5cd26aa

Browse files
committed
Merge pull request matplotlib#5167 from Tillsten/fix_#3588
FIX: symlog support for ax.minorticks_on()
2 parents 9807068 + a6716df commit 5cd26aa

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/matplotlib/axes/_base.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3216,9 +3216,13 @@ def format_coord(self, x, y):
32163216
def minorticks_on(self):
32173217
'Add autoscaling minor ticks to the axes.'
32183218
for ax in (self.xaxis, self.yaxis):
3219-
if ax.get_scale() == 'log':
3219+
scale = ax.get_scale()
3220+
if scale == 'log':
32203221
s = ax._scale
32213222
ax.set_minor_locator(mticker.LogLocator(s.base, s.subs))
3223+
elif scale == 'symlog':
3224+
s = ax._scale
3225+
ax.set_minor_locator(mticker.SymLogLocator(s.base, s.subs))
32223226
else:
32233227
ax.set_minor_locator(mticker.AutoMinorLocator())
32243228

0 commit comments

Comments
 (0)