diff --git a/lib/matplotlib/axes/_base.py b/lib/matplotlib/axes/_base.py index 07735ae0aef6..b10d06120632 100644 --- a/lib/matplotlib/axes/_base.py +++ b/lib/matplotlib/axes/_base.py @@ -3413,7 +3413,7 @@ def minorticks_on(self): elif scale == 'symlog': s = ax._scale ax.set_minor_locator( - mticker.SymmetricalLogLocator(s.base, s.subs)) + mticker.SymmetricalLogLocator(s._transform, s.subs)) else: ax.set_minor_locator(mticker.AutoMinorLocator()) diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py index 2219bda7f61b..4ffdf72c8c65 100644 --- a/lib/matplotlib/tests/test_axes.py +++ b/lib/matplotlib/tests/test_axes.py @@ -5047,3 +5047,14 @@ def test_invalid_axis_limits(): plt.ylim(np.nan) with pytest.raises(ValueError): plt.ylim(np.inf) + + +# Test all 4 combinations of logs/symlogs for minorticks_on() +@pytest.mark.parametrize('xscale', ['symlog', 'log']) +@pytest.mark.parametrize('yscale', ['symlog', 'log']) +def test_minorticks_on(xscale, yscale): + ax = plt.subplot(111) + ax.plot([1, 2, 3, 4]) + ax.set_xscale(xscale) + ax.set_yscale(yscale) + ax.minorticks_on() 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