File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2145,8 +2145,7 @@ def __init__(self):
21452145class AutoMinorLocator (Locator ):
21462146 """
21472147 Dynamically find minor tick positions based on the positions of
2148- major ticks. Assumes the scale is linear and major ticks are
2149- evenly spaced.
2148+ major ticks. The scale must be linear with major ticks evenly spaced.
21502149 """
21512150 def __init__ (self , n = None ):
21522151 """
@@ -2160,6 +2159,11 @@ def __init__(self, n=None):
21602159
21612160 def __call__ (self ):
21622161 'Return the locations of the ticks'
2162+ if self .axis .get_scale () == 'log' :
2163+ warnings .warn ('AutoMinorLocator does not work with logarithmic '
2164+ 'scale' )
2165+ return []
2166+
21632167 majorlocs = self .axis .get_majorticklocs ()
21642168 try :
21652169 majorstep = majorlocs [1 ] - majorlocs [0 ]
You can’t perform that action at this time.
0 commit comments