def __call__(self):
majorlocs = self.axis.get_majorticklocs()<EOL>trans = self.axis.get_transform()<EOL>try:<EOL><INDENT>majorstep = majorlocs[<NUM_LIT:1>] - majorlocs[<NUM_LIT:0>]<EOL><DEDENT>except IndexError:<EOL><INDENT>majorstep = <NUM_LIT:0><EOL><DEDENT>if self.ndivs is None:<EOL><INDENT>if majorstep == <NUM_LIT:0>:<EOL><INDENT>ndivs = <NUM_LIT:1><EOL><DEDENT>else:<EOL><INDENT>scale_ = trans.get_scale()<EOL>gpsstep = majorstep / scale_<EOL>x = int(round(<NUM_LIT:10> ** (numpy.log10(gpsstep) % <NUM_LIT:1>)))<EOL>if trans.unit == units.week and gpsstep == <NUM_LIT:1>:<EOL><INDENT>ndivs = <NUM_LIT:7><EOL><DEDENT>elif trans.unit == units.year and gpsstep <= <NUM_LIT:1>:<EOL><INDENT>ndivs = <NUM_LIT:6><EOL><DEDENT>elif trans.unit != units.day and x in [<NUM_LIT:1>, <NUM_LIT:5>, <NUM_LIT:10>]:<EOL><INDENT>ndivs = <NUM_LIT:5><EOL><DEDENT>else:<EOL><INDENT>ndivs = <NUM_LIT:4><EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>ndivs = self.ndivs<EOL><DEDENT>minorstep = majorstep / ndivs<EOL>vmin, vmax = self.axis.get_view_interval()<EOL>if vmin > vmax:<EOL><INDENT>vmin, vmax = vmax, vmin<EOL><DEDENT>if numpy.size(majorlocs):<EOL><INDENT>epoch = majorlocs[<NUM_LIT:0>]<EOL>tmin = numpy.floor((vmin - epoch) / minorstep) * minorstep<EOL>tmax = numpy.ceil((vmax - epoch) / minorstep) * minorstep<EOL>locs = numpy.arange(tmin, tmax, minorstep) + epoch<EOL>cond = numpy.abs((locs - epoch) % majorstep) > minorstep / <NUM_LIT><EOL>locs = locs.compress(cond)<EOL><DEDENT>else:<EOL><INDENT>locs = []<EOL><DEDENT>return self.raise_if_exceeds(numpy.array(locs))<EOL>
Return the locations of the ticks