'Set the class:`~matplotlib.axes.Axes` figure
accepts a class:`~matplotlib.figure.Figure` instance'

def set_figure(self, fig):

    martist.Artist.set_figure(self, fig)
    self.bbox = mtransforms.TransformedBbox(self._position, fig.transFigure)
    self.dataLim = mtransforms.Bbox.null()
    self.viewLim = mtransforms.Bbox.unit()
    self.transScale = mtransforms.TransformWrapper(mtransforms.IdentityTransform())
    self._set_lim_and_transforms()
