@@ -164,8 +164,7 @@ def test_SymmetricalLogLocator_set_params():
164
164
See if change was successful.
165
165
Should not exception.
166
166
"""
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 )
169
168
sym .set_params (subs = [2.0 ], numticks = 8 )
170
169
assert sym ._subs == [2.0 ]
171
170
assert sym .numticks == 8
@@ -245,7 +244,7 @@ def test_LogFormatter_sublabel():
245
244
ax .xaxis .set_major_locator (mticker .LogLocator (base = 10 , subs = []))
246
245
ax .xaxis .set_minor_locator (mticker .LogLocator (base = 10 ,
247
246
subs = np .arange (2 , 10 )))
248
- ax .xaxis .set_major_formatter (mticker .LogFormatter ())
247
+ ax .xaxis .set_major_formatter (mticker .LogFormatter (labelOnlyBase = True ))
249
248
ax .xaxis .set_minor_formatter (mticker .LogFormatter (labelOnlyBase = False ))
250
249
# axis range above 3 decades, only bases are labeled
251
250
ax .set_xlim (1 , 1e4 )
@@ -266,9 +265,13 @@ def test_LogFormatter_sublabel():
266
265
ax .set_xlim (1 , 80 )
267
266
_sub_labels (ax .xaxis , subs = [])
268
267
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
270
269
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 ))
272
275
273
276
274
277
class FakeAxis (object ):
0 commit comments