@@ -162,8 +162,7 @@ def test_SymmetricalLogLocator_set_params():
162162 See if change was successful.
163163 Should not exception.
164164 """
165- # since we only test for the params change. I will pass empty transform
166- sym = mticker .SymmetricalLogLocator (None )
165+ sym = mticker .SymmetricalLogLocator (base = 10 , linthresh = 1 )
167166 sym .set_params (subs = [2.0 ], numticks = 8 )
168167 nose .tools .assert_equal (sym ._subs , [2.0 ])
169168 nose .tools .assert_equal (sym .numticks , 8 )
@@ -240,7 +239,7 @@ def test_LogFormatter_sublabel():
240239 ax .xaxis .set_major_locator (mticker .LogLocator (base = 10 , subs = []))
241240 ax .xaxis .set_minor_locator (mticker .LogLocator (base = 10 ,
242241 subs = np .arange (2 , 10 )))
243- ax .xaxis .set_major_formatter (mticker .LogFormatter ())
242+ ax .xaxis .set_major_formatter (mticker .LogFormatter (labelOnlyBase = True ))
244243 ax .xaxis .set_minor_formatter (mticker .LogFormatter (labelOnlyBase = False ))
245244 # axis range above 3 decades, only bases are labeled
246245 ax .set_xlim (1 , 1e4 )
@@ -261,9 +260,13 @@ def test_LogFormatter_sublabel():
261260 ax .set_xlim (1 , 80 )
262261 _sub_labels (ax .xaxis , subs = [])
263262
264- # axis range at 0 to 1 decades, label subs 2, 3, 6
263+ # axis range at 0.4 to 1 decades, label subs 2, 3, 4 , 6
265264 ax .set_xlim (1 , 8 )
266- _sub_labels (ax .xaxis , subs = [2 , 3 , 6 ])
265+ _sub_labels (ax .xaxis , subs = [2 , 3 , 4 , 6 ])
266+
267+ # axis range at 0 to 0.4 decades, label all
268+ ax .set_xlim (0.5 , 0.9 )
269+ _sub_labels (ax .xaxis , subs = np .arange (2 , 10 , dtype = int ))
267270
268271
269272def _logfe_helper (formatter , base , locs , i , expected_result ):
0 commit comments