matplotlib.axes.Axes.add_artist#

Axes.add_artist(a)[source]#

Add an Artist to the Axes; return the artist.

Use add_artist only for artists for which there is no dedicated "add" method; and if necessary, use a method such as update_datalim to manually update the dataLim if the artist is to be included in autoscaling.

If no transform has been specified when creating the artist (e.g. artist.get_transform() == None) then the transform is set to ax.transData.

Examples using matplotlib.axes.Axes.add_artist#

Scatter plots with a legend

Scatter plots with a legend

BboxImage Demo

BboxImage Demo

Bar of pie

Bar of pie

Annotating Plots

Annotating Plots

AnnotationBbox demo

AnnotationBbox demo

Using a text as a Path

Using a text as a Path

Reference for Matplotlib artists

Reference for Matplotlib artists

Ellipse Demo

Ellipse Demo

Anchored Direction Arrow

Anchored Direction Arrow

Axes Grid2

Axes Grid2

Inset locator demo 2

Inset locator demo 2

Simple Anchored Artists

Simple Anchored Artists

Anatomy of a figure

Anatomy of a figure

Anchored Artists

Anchored Artists

Artist tests

Artist tests

Anchored Box04

Anchored Box04

Annotate Explain

Annotate Explain

Connect Simple01

Connect Simple01

Simple Annotate01

Simple Annotate01

Simple Legend02

Simple Legend02

Legend guide

Legend guide

Annotations

Annotations