matplotlib.figure.Figure.add_artist#

Figure.add_artist(artist,clip=False)[source]#

Add anArtist to the figure.

Usually artists are added toAxes objects usingAxes.add_artist; this method can be used in the rare cases whereone needs to add artists directly to the figure instead.

Parameters:
artistArtist

The artist to add to the figure. If the added artist has notransform previously set, its transform will be set tofigure.transSubfigure.

clipbool, default: False

Whether the added artist should be clipped by the figure patch.

Returns:
Artist

The added artist.

Examples usingmatplotlib.figure.Figure.add_artist#

Multiple Axes animation

Multiple Axes animation

Add lines directly to a figure

Add lines directly to a figure

Constrained layout guide

Constrained layout guide

Annotations

Annotations