matplotlib.artist.Artist.set_figure#

Artist.set_figure(fig)[source]#

Set theFigure orSubFigure instance the artist belongs to.

Warning

This function should typically not be called by users.

This is a low-level API and only modifies the internal state of theArtist. Only modifying this is not enough and will typically leadto an inconsistent state, because the state of the figure has tobe changed as well.

Users should typically instead call one of the high-level APIs, i.e.Figure.add_artist or one of the Axes methodsAdding artists.

Parameters:
figFigure orSubFigure
On this page