def get_major_ticks(self, numticks=None):
if numticks is None:<EOL><INDENT>numticks = len(self.get_major_locator()())<EOL><DEDENT>if len(self.majorTicks) < numticks:<EOL><INDENT>for i in range(numticks - len(self.majorTicks)):<EOL><INDENT>tick = self._get_tick(major=True)<EOL>self.majorTicks.append(tick)<EOL><DEDENT><DEDENT>if self._lastNumMajorTicks < numticks:<EOL><INDENT>protoTick = self.majorTicks[<NUM_LIT:0>]<EOL>for i in range(self._lastNumMajorTicks, len(self.majorTicks)):<EOL><INDENT>tick = self.majorTicks[i]<EOL>if self._gridOnMajor: tick.gridOn = True<EOL>self._copy_tick_props(protoTick, tick)<EOL><DEDENT><DEDENT>self._lastNumMajorTicks = numticks<EOL>ticks = self.majorTicks[:numticks]<EOL>return ticks<EOL>
get the tick instances; grow as necessary