<divid="unreleased-message"> You are reading an old version of the documentation (v3.4.3). For the latest version see <ahref="https://matplotlib.org/stable/api/artist_api.html">https://matplotlib.org/stable/api/artist_api.html</a></div>
<spanid="artist-api"></span><h1><codeclass="docutils literal notranslate"><spanclass="pre">matplotlib.artist</span></code><aclass="headerlink" href="#matplotlib-artist" title="Permalink to this headline">¶</a></h1>
<areashape="rect" id="node3" href="offsetbox_api.html#matplotlib.offsetbox.AnchoredOffsetbox" target="_top" title="An offset box placed according to location *loc*." alt="" coords="274,432,397,450"/>
<areashape="rect" id="node5" href="offsetbox_api.html#matplotlib.offsetbox.AnchoredText" target="_top" title="AnchoredOffsetbox with Text." alt="" coords="451,432,542,450"/>
<areashape="rect" id="node4" href="offsetbox_api.html#matplotlib.offsetbox.OffsetBox" target="_top" title="The OffsetBox is a simple container artist." alt="" coords="157,479,226,498"/>
<areashape="rect" id="node17" href="offsetbox_api.html#matplotlib.offsetbox.AuxTransformBox" target="_top" title="Offset Box with the aux_transform. Its children will be" alt="" coords="279,463,393,482"/>
<areashape="rect" id="node39" href="offsetbox_api.html#matplotlib.offsetbox.DrawingArea" target="_top" title="The DrawingArea can contain any Artist as a child. The DrawingArea" alt="" coords="292,495,379,514"/>
<areashape="rect" id="node58" href="offsetbox_api.html#matplotlib.offsetbox.PaddedBox" target="_top" title="A container to add a padding around an `.Artist`." alt="" coords="297,368,374,387"/>
<areashape="rect" id="node72" href="offsetbox_api.html#matplotlib.offsetbox.TextArea" target="_top" title="The TextArea is a container artist for a single Text instance." alt="" coords="305,400,367,419"/>
<areashape="rect" id="node6" href="text_api.html#matplotlib.text.Annotation" target="_top" title="An `.Annotation` is a `.Text` that can refer to a specific position *xy*." alt="" coords="298,305,374,323"/>
<areashape="rect" id="node7" href="text_api.html#matplotlib.text.Text" target="_top" title="Handle storing and drawing of text in window or data coordinates." alt="" coords="172,441,211,460"/>
<areashape="rect" id="node34" href="contour_api.html#matplotlib.contour.ClabelText" target="_top" title="Unlike the ordinary text, the get_rotation returns an updated" alt="" coords="300,336,371,355"/>
<areashape="rect" id="node9" href="offsetbox_api.html#matplotlib.offsetbox.AnnotationBbox" target="_top" title="Container for an `OffsetBox` referring to a specific position *xy*." alt="" coords="139,365,244,384"/>
<areashape="rect" id="node10" href="#matplotlib.artist.Artist" target="_top" title="Abstract base class for objects that render into a FigureCanvas." alt="" coords="36,733,79,752"/>
<areashape="rect" id="node14" href="_as_gen/matplotlib.patches.Patch.html#matplotlib.patches.Patch" target="_top" title="A patch is a 2D artist with a face color and an edge color." alt="" coords="169,749,213,768"/>
<areashape="rect" id="node22" href="axis_api.html#matplotlib.axis.Axis" target="_top" title="Base class for `.XAxis` and `.YAxis`." alt="" coords="172,892,211,911"/>
<areashape="rect" id="node35" href="collections_api.html#matplotlib.collections.Collection" target="_top" title="Base class for Collections. Must be subclassed to be usable." alt="" coords="157,130,226,149"/>
<areashape="rect" id="node47" href="figure_api.html#matplotlib.figure.FigureBase" target="_top" title="Base class for `.figure.Figure` and `.figure.SubFigure` containing the" alt="" coords="153,956,229,974"/>
<areashape="rect" id="node53" href="legend_api.html#matplotlib.legend.Legend" target="_top" title="Place a legend on the axes at location loc." alt="" coords="163,924,219,943"/>
<areashape="rect" id="node54" href="_as_gen/matplotlib.lines.Line2D.html#matplotlib.lines.Line2D" target="_top" title="A line - the line can have both a solid linestyle connecting all" alt="" coords="165,1019,218,1038"/>
<areashape="rect" id="node66" href="_as_gen/matplotlib.quiver.QuiverKey.html#matplotlib.quiver.QuiverKey" target="_top" title="Labelled arrow for use as a quiver plot scale key." alt="" coords="155,409,227,428"/>
<areashape="rect" id="node71" href="table_api.html#matplotlib.table.Table" target="_top" title="A table of cells." alt="" coords="170,717,212,736"/>
<areashape="rect" id="node73" href="axis_api.html#matplotlib.axis.Tick" target="_top" title="Abstract base class for the axis ticks, grid lines and labels." alt="" coords="172,860,211,879"/>
<areashape="rect" id="node11" href="_as_gen/matplotlib.patches.Arc.html#matplotlib.patches.Arc" target="_top" title="An elliptical arc, i.e. a segment of an ellipse." alt="" coords="477,702,516,720"/>
<areashape="rect" id="node28" href="_as_gen/matplotlib.patches.Rectangle.html#matplotlib.patches.Rectangle" target="_top" title="A rectangle defined via an anchor point *xy* and its *width* and *height*." alt="" coords="301,749,371,768"/>
<areashape="rect" id="node38" href="_as_gen/matplotlib.patches.FancyArrowPatch.html#matplotlib.patches.FancyArrowPatch" target="_top" title="A fancy arrow patch. It draws an arrow using the `ArrowStyle`." alt="" coords="280,813,391,832"/>
<areashape="rect" id="node44" href="_as_gen/matplotlib.patches.Polygon.html#matplotlib.patches.Polygon" target="_top" title="A general polygon patch." alt="" coords="307,845,365,863"/>
<areashape="rect" id="node45" href="_as_gen/matplotlib.patches.FancyBboxPatch.html#matplotlib.patches.FancyBboxPatch" target="_top" title="A fancy box around a rectangle with lower left at *xy* = (*x*, *y*)" alt="" coords="282,876,389,895"/>
<areashape="rect" id="node68" href="spines_api.html#matplotlib.spines.Spine" target="_top" title="An axis spine -- the line noting the data area boundaries." alt="" coords="313,622,358,641"/>
<areashape="rect" id="node15" href="collections_api.html#matplotlib.collections.AsteriskPolygonCollection" target="_top" title="Draw a collection of regular asterisks with *numsides* points." alt="" coords="591,35,753,53"/>
<areashape="rect" id="node69" href="collections_api.html#matplotlib.collections.StarPolygonCollection" target="_top" title="Draw a collection of regular stars with *numsides* points." alt="" coords="602,3,742,22"/>
<areashape="rect" id="node63" href="projections_api.html#matplotlib.projections.polar.PolarAxes" target="_top" title="A polar graph projection, where the input dimensions are *theta*, *r*." alt="" coords="462,1114,531,1133"/>
<areashape="rect" id="node20" href="image_api.html#matplotlib.image.AxesImage" target="_top" title="An image attached to an Axes." alt="" coords="298,209,374,228"/>
<areashape="rect" id="node62" href="image_api.html#matplotlib.image.PcolorImage" target="_top" title="Make a pcolor-style plot with an irregular rectangular grid." alt="" coords="454,241,538,260"/>
<areashape="rect" id="node25" href="image_api.html#matplotlib.image.BboxImage" target="_top" title="The Image class whose size is determined by the given bbox." alt="" coords="297,241,374,260"/>
<areashape="rect" id="node48" href="image_api.html#matplotlib.image.FigureImage" target="_top" title="An image attached to a figure." alt="" coords="294,273,378,292"/>
<areashape="rect" id="node26" href="collections_api.html#matplotlib.collections.BrokenBarHCollection" target="_top" title="A collection of horizontal bars spanning *yrange* with a sequence of" alt="" coords="603,98,741,117"/>
<areashape="rect" id="node65" href="_as_gen/matplotlib.quiver.Quiver.html#matplotlib.quiver.Quiver" target="_top" title="Specialized PolyCollection for arrows." alt="" coords="646,130,698,149"/>
<areashape="rect" id="node27" href="table_api.html#matplotlib.table.Cell" target="_top" title="A cell is a `.Rectangle` with some associated `.Text`." alt="" coords="477,749,516,768"/>
<areashape="rect" id="node30" href="collections_api.html#matplotlib.collections.CircleCollection" target="_top" title="A collection of circles, drawn using splines." alt="" coords="445,114,547,133"/>
<areashape="rect" id="node60" href="collections_api.html#matplotlib.collections.PathCollection" target="_top" title="A collection of `~.path.Path`s, as created by e.g. `~.Axes.scatter`." alt="" coords="449,146,544,165"/>
<areashape="rect" id="node32" href="_as_gen/matplotlib.patches.CirclePolygon.html#matplotlib.patches.CirclePolygon" target="_top" title="A polygon-approximation of a circle patch." alt="" coords="451,781,541,800"/>
<areashape="rect" id="node40" href="collections_api.html#matplotlib.collections.EllipseCollection" target="_top" title="A collection of ellipses, drawn using splines." alt="" coords="282,146,389,165"/>
<areashape="rect" id="node42" href="collections_api.html#matplotlib.collections.LineCollection" target="_top" title="Represents a sequence of `.Line2D`s that should be drawn together." alt="" coords="289,178,383,196"/>
<areashape="rect" id="node64" href="collections_api.html#matplotlib.collections.QuadMesh" target="_top" title="Class for the efficient drawing of a quadrilateral mesh." alt="" coords="299,51,372,69"/>
<areashape="rect" id="node74" href="collections_api.html#matplotlib.collections.TriMesh" target="_top" title="Class for the efficient drawing of a triangular mesh using Gouraud shading." alt="" coords="308,82,363,101"/>
<areashape="rect" id="node36" href="cm_api.html#matplotlib.cm.ScalarMappable" target="_top" title="A mixin class to map scalar data to RGBA." alt="" coords="5,193,110,212"/>
<areashape="rect" id="node37" href="_as_gen/matplotlib.patches.ConnectionPatch.html#matplotlib.patches.ConnectionPatch" target="_top" title="A patch that connects two points (possibly in different axes)." alt="" coords="441,813,551,832"/>
<areashape="rect" id="node41" href="collections_api.html#matplotlib.collections.EventCollection" target="_top" title="A collection of locations along a single axis at which an "event" occurred." alt="" coords="445,178,547,196"/>
<areashape="rect" id="node43" href="_as_gen/matplotlib.patches.FancyArrow.html#matplotlib.patches.FancyArrow" target="_top" title="Like Arrow, but lets you set head width and head height independently." alt="" coords="457,845,536,863"/>
<areashape="rect" id="node46" href="figure_api.html#matplotlib.figure.Figure" target="_top" title="The top level container for all the plot elements." alt="" coords="312,1067,359,1086"/>
<areashape="rect" id="node49" href="offsetbox_api.html#matplotlib.offsetbox.HPacker" target="_top" title="HPacker packs its children horizontally, automatically adjusting their" alt="" coords="467,543,526,562"/>
<areashape="rect" id="node75" href="offsetbox_api.html#matplotlib.offsetbox.VPacker" target="_top" title="VPacker packs its children vertically, automatically adjusting their" alt="" coords="467,511,525,530"/>
<areashape="rect" id="node78" href="axis_api.html#matplotlib.axis.XTick" target="_top" title="Contains all the Artists needed to make an x tick - the tick line," alt="" coords="314,972,357,990"/>
<areashape="rect" id="node80" href="axis_api.html#matplotlib.axis.YTick" target="_top" title="Contains all the Artists needed to make a Y tick - the tick line," alt="" coords="315,940,357,959"/>
<h2><codeclass="docutils literal notranslate"><spanclass="pre">Artist</span></code> class<aclass="headerlink" href="#artist-class" title="Permalink to this headline">¶</a></h2>
<dlclass="py class">
<dtid="matplotlib.artist.Artist">
<emclass="property">class </em><codeclass="descclassname">matplotlib.artist.</code><codeclass="descname">Artist</code><aclass="reference internal" href="../_modules/matplotlib/artist.html#Artist"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.artist.Artist" title="Permalink to this definition">¶</a></dt>
<dd><p>Abstract base class for objects that render into a FigureCanvas.</p>
<p>Typically, all visible elements in a figure are subclasses of Artist.</p>
</dd></dl>
<divclass="section" id="interactive">
<h3>Interactive<aclass="headerlink" href="#interactive" title="Permalink to this headline">¶</a></h3>
<td>Add a callback function that will be called whenever one of the <aclass="reference internal" href="#matplotlib.artist.Artist" title="matplotlib.artist.Artist"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Artist</span></code></a>'s properties changes.</td>
<td>The <aclass="reference internal" href="axes_api.html#matplotlib.axes.Axes" title="matplotlib.axes.Axes"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Axes</span></code></a> instance the artist resides in, or <em>None</em>.</td>
<td>Return a list of the child <aclass="reference internal" href="#matplotlib.artist.Artist" title="matplotlib.artist.Artist"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Artist</span></code></a>s of this <aclass="reference internal" href="#matplotlib.artist.Artist" title="matplotlib.artist.Artist"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Artist</span></code></a>.</td>
<td>Return the <aclass="reference internal" href="transformations.html#matplotlib.transforms.Transform" title="matplotlib.transforms.Transform"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Transform</span></code></a> instance used by this artist.</td>
<td>Return boolean flag, <codeclass="docutils literal notranslate"><spanclass="pre">True</span></code> if artist is included in layout calculations.</td>
<td>Return the value of an <aclass="reference internal" href="#matplotlib.artist.Artist" title="matplotlib.artist.Artist"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Artist</span></code></a>'s <em>property</em>, or print all of them.</td>
<td>Return the value of an <aclass="reference internal" href="#matplotlib.artist.Artist" title="matplotlib.artist.Artist"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Artist</span></code></a>'s <em>property</em>, or print all of them.</td>
<td>Set one or more properties on an <aclass="reference internal" href="#matplotlib.artist.Artist" title="matplotlib.artist.Artist"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Artist</span></code></a>, or list allowed values.</td>
<td>Inspect an <aclass="reference internal" href="#matplotlib.artist.Artist" title="matplotlib.artist.Artist"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Artist</span></code></a> class (using <aclass="reference internal" href="_as_gen/matplotlib.artist.ArtistInspector.html#matplotlib.artist.ArtistInspector" title="matplotlib.artist.ArtistInspector"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">ArtistInspector</span></code></a>) and return information about its settable properties and their current values.</td>
<td>A helper class to inspect an <aclass="reference internal" href="#matplotlib.artist.Artist" title="matplotlib.artist.Artist"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Artist</span></code></a> and return information about its settable properties and their current values.</td>