@@ -164,8 +164,7 @@ def test_SymmetricalLogLocator_set_params():
164164 See if change was successful.
165165 Should not exception.
166166 """
167- # since we only test for the params change. I will pass empty transform
168- sym = mticker .SymmetricalLogLocator (None )
167+ sym = mticker .SymmetricalLogLocator (base = 10 , linthresh = 1 )
169168 sym .set_params (subs = [2.0 ], numticks = 8 )
170169 assert sym ._subs == [2.0 ]
171170 assert sym .numticks == 8
@@ -245,7 +244,7 @@ def test_LogFormatter_sublabel():
245244 ax .xaxis .set_major_locator (mticker .LogLocator (base = 10 , subs = []))
246245 ax .xaxis .set_minor_locator (mticker .LogLocator (base = 10 ,
247246 subs = np .arange (2 , 10 )))
248- ax .xaxis .set_major_formatter (mticker .LogFormatter ())
247+ ax .xaxis .set_major_formatter (mticker .LogFormatter (labelOnlyBase = True ))
249248 ax .xaxis .set_minor_formatter (mticker .LogFormatter (labelOnlyBase = False ))
250249 # axis range above 3 decades, only bases are labeled
251250 ax .set_xlim (1 , 1e4 )
@@ -266,9 +265,13 @@ def test_LogFormatter_sublabel():
266265 ax .set_xlim (1 , 80 )
267266 _sub_labels (ax .xaxis , subs = [])
268267
269- # axis range at 0 to 1 decades, label subs 2, 3, 6
268+ # axis range at 0.4 to 1 decades, label subs 2, 3, 4 , 6
270269 ax .set_xlim (1 , 8 )
271- _sub_labels (ax .xaxis , subs = [2 , 3 , 6 ])
270+ _sub_labels (ax .xaxis , subs = [2 , 3 , 4 , 6 ])
271+
272+ # axis range at 0 to 0.4 decades, label all
273+ ax .set_xlim (0.5 , 0.9 )
274+ _sub_labels (ax .xaxis , subs = np .arange (2 , 10 , dtype = int ))
272275
273276
274277class FakeAxis (object ):
0 commit comments