'Draw the axis lines, grid lines, tick lines and labels'

@allow_rasterization
def draw(self, renderer, *args, **kwargs):

    if (not self.get_visible()):
        return
    renderer.open_group(__name__)
    ticks_to_draw = self._update_ticks(renderer)
    (ticklabelBoxes, ticklabelBoxes2) = self._get_tick_bboxes(ticks_to_draw, renderer)
    for tick in ticks_to_draw:
        tick.draw(renderer)
    self._update_label_position(ticklabelBoxes, ticklabelBoxes2)
    self.label.draw(renderer)
    self._update_offset_text_position(ticklabelBoxes, ticklabelBoxes2)
    self.offsetText.set_text(self.major.formatter.get_offset())
    self.offsetText.draw(renderer)
    if 0:
        for tick in self.majorTicks:
            label = tick.label1
            mpatches.bbox_artist(label, renderer)
        mpatches.bbox_artist(self.label, renderer)
    renderer.close_group(__name__)
    self.stale = False
