'Set the :class:`~matplotlib.figure.Figure` instance the artist
belongs to.
ACCEPTS: a :class:`matplotlib.figure.Figure` instance'

def set_figure(self, fig):

    if (self.figure is fig):
        return
    if (self.figure is not None):
        raise RuntimeError(u'Can    not    put    single    artist    in    more    than    one    figure')
    self.figure = fig
    if (self.figure and (self.figure is not self)):
        self.pchanged()
    self.stale = True
