File tree 2 files changed +14
-0
lines changed
2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -111,6 +111,15 @@ def test_MultipleLocator_set_params():
111
111
mult .set_params (base = 1.7 )
112
112
nose .tools .assert_equal (mult ._base , 1.7 )
113
113
114
+ def test_LogitLocator_set_params ():
115
+ """
116
+ Create logit locator with default minor=False, and change it to something
117
+ else. See if change was successful. Should not exception.
118
+ """
119
+ loc = mticker .LogitLocator () # Defaults to false.
120
+ loc .set_params (minor = True )
121
+ nose .tools .assert_true (loc .minor )
122
+
114
123
115
124
def test_FixedLocator_set_params ():
116
125
"""
Original file line number Diff line number Diff line change @@ -1781,6 +1781,11 @@ def __init__(self, minor=False):
1781
1781
"""
1782
1782
self .minor = minor
1783
1783
1784
+ def set_params (self , minor = None ):
1785
+ """Set parameters within this locator."""
1786
+ if minor is not None :
1787
+ self .minor = minor
1788
+
1784
1789
def __call__ (self ):
1785
1790
'Return the locations of the ticks'
1786
1791
vmin , vmax = self .axis .get_view_interval ()
You can’t perform that action at this time.
0 commit comments