def draw(self, renderer, *args, **kwargs):
ticklabelBoxes = []<EOL>ticklabelBoxes2 = []<EOL>if not self.get_visible(): return<EOL>renderer.open_group(__name__)<EOL>interval = self.get_view_interval()<EOL>for tick, loc, label in self.iter_ticks():<EOL><INDENT>if tick is None: continue<EOL>if not mtransforms.interval_contains(interval, loc): continue<EOL>tick.update_position(loc)<EOL>tick.set_label1(label)<EOL>tick.set_label2(label)<EOL>tick.draw(renderer)<EOL>if tick.label1On and tick.label1.get_visible():<EOL><INDENT>extent = tick.label1.get_window_extent(renderer)<EOL>ticklabelBoxes.append(extent)<EOL><DEDENT>if tick.label2On and tick.label2.get_visible():<EOL><INDENT>extent = tick.label2.get_window_extent(renderer)<EOL>ticklabelBoxes2.append(extent)<EOL><DEDENT><DEDENT>self._update_label_position(ticklabelBoxes, ticklabelBoxes2)<EOL>self.label.draw(renderer)<EOL>self._update_offset_text_position(ticklabelBoxes, ticklabelBoxes2)<EOL>self.offsetText.set_text( self.major.formatter.get_offset() )<EOL>self.offsetText.draw(renderer)<EOL>if <NUM_LIT:0>: <EOL><INDENT>for tick in majorTicks:<EOL><INDENT>label = tick.label1<EOL>mpatches.bbox_artist(label, renderer)<EOL><DEDENT>mpatches.bbox_artist(self.label, renderer)<EOL><DEDENT>renderer.close_group(__name__)<EOL>
Draw the axis lines, grid lines, tick lines and labels