File tree 2 files changed +12
-1
lines changed
2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -3413,7 +3413,7 @@ def minorticks_on(self):
3413
3413
elif scale == 'symlog' :
3414
3414
s = ax ._scale
3415
3415
ax .set_minor_locator (
3416
- mticker .SymmetricalLogLocator (s .base , s .subs ))
3416
+ mticker .SymmetricalLogLocator (s ._transform , s .subs ))
3417
3417
else :
3418
3418
ax .set_minor_locator (mticker .AutoMinorLocator ())
3419
3419
Original file line number Diff line number Diff line change @@ -5047,3 +5047,14 @@ def test_invalid_axis_limits():
5047
5047
plt .ylim (np .nan )
5048
5048
with pytest .raises (ValueError ):
5049
5049
plt .ylim (np .inf )
5050
+
5051
+
5052
+ # Test all 4 combinations of logs/symlogs for minorticks_on()
5053
+ @pytest .mark .parametrize ('xscale' , ['symlog' , 'log' ])
5054
+ @pytest .mark .parametrize ('yscale' , ['symlog' , 'log' ])
5055
+ def test_minorticks_on (xscale , yscale ):
5056
+ ax = plt .subplot (111 )
5057
+ ax .plot ([1 , 2 , 3 , 4 ])
5058
+ ax .set_xscale (xscale )
5059
+ ax .set_yscale (yscale )
5060
+ ax .minorticks_on ()
You can’t perform that action at this time.
0 commit comments