You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
<divid="unreleased-message"> You are reading an old version of the documentation (v3.3.0). For the latest version see <ahref="https://matplotlib.org/stable/api/text_api.html">https://matplotlib.org/stable/api/text_api.html</a></div>
<spanid="matplotlib-text"></span><h1><codeclass="docutils literal notranslate"><spanclass="pre">matplotlib.text</span></code><aclass="headerlink" href="#module-matplotlib.text" title="Permalink to this headline">¶</a></h1>
<p>Classes for including text in a figure.</p>
<dlclass="class">
<dtid="matplotlib.text.Annotation">
<emclass="property">class </em><codeclass="descclassname">matplotlib.text.</code><codeclass="descname">Annotation</code><spanclass="sig-paren">(</span><em>text</em>, <em>xy</em>, <em>xytext=None</em>, <em>xycoords='data'</em>, <em>textcoords=None</em>, <em>arrowprops=None</em>, <em>annotation_clip=None</em>, <em>**kwargs</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#Annotation"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.Annotation" title="Permalink to this definition">¶</a></dt>
<p>An <aclass="reference internal" href="#matplotlib.text.Annotation" title="matplotlib.text.Annotation"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Annotation</span></code></a> is a <aclass="reference internal" href="#matplotlib.text.Text" title="matplotlib.text.Text"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Text</span></code></a> that can refer to a specific position <em>xy</em>.
Optionally an arrow pointing from the text to <em>xy</em> can be drawn.</p>
<dt><strong>xycoords</strong></dt><dd><p>The coordinate system for <em>xy</em>.</p>
</dd>
<dt><strong>arrow_patch</strong></dt><dd><p>A <aclass="reference internal" href="_as_gen/matplotlib.patches.FancyArrowPatch.html#matplotlib.patches.FancyArrowPatch" title="matplotlib.patches.FancyArrowPatch"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">FancyArrowPatch</span></code></a> to point from <em>xytext</em> to <em>xy</em>.</p>
</dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p>Annotate the point <em>xy</em> with text <em>text</em>.</p>
<p>In the simplest form, the text is placed at <em>xy</em>.</p>
<p>Optionally, the text can be displayed in another position <em>xytext</em>.
An arrow pointing from the text to the annotated point <em>xy</em> can then
<dt><strong>text</strong><spanclass="classifier">str</span></dt><dd><p>The text of the annotation. <em>s</em> is a deprecated synonym for this
parameter.</p>
</dd>
<dt><strong>xy</strong><spanclass="classifier">(float, float)</span></dt><dd><p>The point <em>(x, y)</em> to annotate. The coordinate system is determined
by <em>xycoords</em>.</p>
</dd>
<dt><strong>xytext</strong><spanclass="classifier">(float, float), default: <em>xy</em></span></dt><dd><p>The position <em>(x, y)</em> to place the text at. The coordinate system
is determined by <em>textcoords</em>.</p>
</dd>
<dt><strong>xycoords</strong><spanclass="classifier">str or <aclass="reference internal" href="artist_api.html#matplotlib.artist.Artist" title="matplotlib.artist.Artist"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Artist</span></code></a> or <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> or callable or (float, float), default: 'data'</span></dt><dd><p>The coordinate system that <em>xy</em> is given in. The following types
of values are supported:</p>
<ul>
<li><pclass="first">One of the following strings:</p>
<tableborder="1" class="docutils align-default">
<colgroup>
<colwidth="27%" />
<colwidth="73%" />
</colgroup>
<theadvalign="bottom">
<trclass="row-odd"><thclass="head">Value</th>
<thclass="head">Description</th>
</tr>
</thead>
<tbodyvalign="top">
<trclass="row-even"><td>'figure points'</td>
<td>Points from the lower left of the figure</td>
</tr>
<trclass="row-odd"><td>'figure pixels'</td>
<td>Pixels from the lower left of the figure</td>
</tr>
<trclass="row-even"><td>'figure fraction'</td>
<td>Fraction of figure from lower left</td>
</tr>
<trclass="row-odd"><td>'axes points'</td>
<td>Points from lower left corner of axes</td>
</tr>
<trclass="row-even"><td>'axes pixels'</td>
<td>Pixels from lower left corner of axes</td>
</tr>
<trclass="row-odd"><td>'axes fraction'</td>
<td>Fraction of axes from lower left</td>
</tr>
<trclass="row-even"><td>'data'</td>
<td>Use the coordinate system of the object being
annotated (default)</td>
</tr>
<trclass="row-odd"><td>'polar'</td>
<td><em>(theta, r)</em> if not native 'data' coordinates</td>
</tr>
</tbody>
</table>
</li>
<li><pclass="first">An <aclass="reference internal" href="artist_api.html#matplotlib.artist.Artist" title="matplotlib.artist.Artist"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Artist</span></code></a>: <em>xy</em> is interpreted as a fraction of the artist's
<aclass="reference internal" href="transformations.html#matplotlib.transforms.Bbox" title="matplotlib.transforms.Bbox"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Bbox</span></code></a>. E.g. <em>(0, 0)</em> would be the lower
left corner of the bounding box and <em>(0.5, 1)</em> would be the
center top of the bounding box.</p>
</li>
<li><pclass="first">A <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> to transform <em>xy</em> to screen coordinates.</p>
</li>
<li><pclass="first">A function with one of the following signatures:</p>
<p>where <em>renderer</em> is a <aclass="reference internal" href="backend_bases_api.html#matplotlib.backend_bases.RendererBase" title="matplotlib.backend_bases.RendererBase"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">RendererBase</span></code></a> subclass.</p>
<p>The result of the function is interpreted like the <aclass="reference internal" href="artist_api.html#matplotlib.artist.Artist" title="matplotlib.artist.Artist"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Artist</span></code></a> and
<li><pclass="first">A tuple <em>(xcoords, ycoords)</em> specifying separate coordinate
systems for <em>x</em> and <em>y</em>. <em>xcoords</em> and <em>ycoords</em> must each be
of one of the above described types.</p>
</li>
</ul>
<p>See <aclass="reference internal" href="../tutorials/text/annotations.html#plotting-guide-annotation"><spanclass="std std-ref">Advanced Annotations</span></a> for more details.</p>
</dd>
<dt><strong>textcoords</strong><spanclass="classifier">str or <aclass="reference internal" href="artist_api.html#matplotlib.artist.Artist" title="matplotlib.artist.Artist"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Artist</span></code></a> or <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> or callable or (float, float), default: value of <em>xycoords</em></span></dt><dd><p>The coordinate system that <em>xytext</em> is given in.</p>
<p>All <em>xycoords</em> values are valid as well as the following
strings:</p>
<tableborder="1" class="docutils align-default">
<colgroup>
<colwidth="29%" />
<colwidth="71%" />
</colgroup>
<theadvalign="bottom">
<trclass="row-odd"><thclass="head">Value</th>
<thclass="head">Description</th>
</tr>
</thead>
<tbodyvalign="top">
<trclass="row-even"><td>'offset points'</td>
<td>Offset (in points) from the <em>xy</em> value</td>
</tr>
<trclass="row-odd"><td>'offset pixels'</td>
<td>Offset (in pixels) from the <em>xy</em> value</td>
</tr>
</tbody>
</table>
</dd>
<dt><strong>arrowprops</strong><spanclass="classifier">dict, optional</span></dt><dd><p>The properties used to draw a <aclass="reference internal" href="_as_gen/matplotlib.patches.FancyArrowPatch.html#matplotlib.patches.FancyArrowPatch" title="matplotlib.patches.FancyArrowPatch"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">FancyArrowPatch</span></code></a> arrow between the
positions <em>xy</em> and <em>xytext</em>.</p>
<p>If <em>arrowprops</em> does not contain the key 'arrowstyle' the
allowed keys are:</p>
<tableborder="1" class="docutils align-default">
<colgroup>
<colwidth="16%" />
<colwidth="84%" />
</colgroup>
<theadvalign="bottom">
<trclass="row-odd"><thclass="head">Key</th>
<thclass="head">Description</th>
</tr>
</thead>
<tbodyvalign="top">
<trclass="row-even"><td>width</td>
<td>The width of the arrow in points</td>
</tr>
<trclass="row-odd"><td>headwidth</td>
<td>The width of the base of the arrow head in points</td>
</tr>
<trclass="row-even"><td>headlength</td>
<td>The length of the arrow head in points</td>
</tr>
<trclass="row-odd"><td>shrink</td>
<td>Fraction of total length to shrink from both ends</td>
<dt><strong>annotation_clip</strong><spanclass="classifier">bool or None, default: None</span></dt><dd><p>Whether to draw the annotation when the annotation point <em>xy</em> is
outside the axes area.</p>
<ulclass="simple">
<li>If <em>True</em>, the annotation will only be drawn when <em>xy</em> is
within the axes.</li>
<li>If <em>False</em>, the annotation will always be drawn.</li>
<li>If <em>None</em>, the annotation will only be drawn when <em>xy</em> is
within the axes and <em>xycoords</em> is 'data'.</li>
</ul>
</dd>
<dt><strong>**kwargs</strong></dt><dd><p>Additional kwargs are passed to <aclass="reference internal" href="#matplotlib.text.Text" title="matplotlib.text.Text"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Text</span></code></a>.</p>
</dd>
</dl>
</td>
</tr>
<trclass="field-even field"><thclass="field-name">Returns:</th><tdclass="field-body"><dlclass="first last docutils">
<emclass="property">property </em><codeclass="descname">anncoords</code><aclass="headerlink" href="#matplotlib.text.Annotation.anncoords" title="Permalink to this definition">¶</a></dt>
<dd><p>The coordinate system to use for <aclass="reference internal" href="#matplotlib.text.Annotation.xyann" title="matplotlib.text.Annotation.xyann"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Annotation.xyann</span></code></a>.</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.text.Annotation.contains">
<codeclass="descname">contains</code><spanclass="sig-paren">(</span><em>self</em>, <em>event</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#Annotation.contains"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.Annotation.contains" title="Permalink to this definition">¶</a></dt>
<dd><p>Return whether the mouse event occurred inside the axis-aligned
bounding-box of the text.</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.text.Annotation.draw">
<codeclass="descname">draw</code><spanclass="sig-paren">(</span><em>self</em>, <em>renderer</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#Annotation.draw"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.Annotation.draw" title="Permalink to this definition">¶</a></dt>
<dd><p>Draw the Artist (and its children) using the given renderer.</p>
<p>This has no effect if the artist is not visible (<aclass="reference internal" href="_as_gen/matplotlib.artist.Artist.get_visible.html#matplotlib.artist.Artist.get_visible" title="matplotlib.artist.Artist.get_visible"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Artist.get_visible</span></code></a>
<p>This method is overridden in the Artist subclasses.</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.text.Annotation.get_anncoords">
<codeclass="descname">get_anncoords</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#Annotation.get_anncoords"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.Annotation.get_anncoords" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the coordinate system to use for <aclass="reference internal" href="#matplotlib.text.Annotation.xyann" title="matplotlib.text.Annotation.xyann"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Annotation.xyann</span></code></a>.</p>
<p>See also <em>xycoords</em> in <aclass="reference internal" href="#matplotlib.text.Annotation" title="matplotlib.text.Annotation"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Annotation</span></code></a>.</p>
<codeclass="descname">get_window_extent</code><spanclass="sig-paren">(</span><em>self</em>, <em>renderer=None</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#Annotation.get_window_extent"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.Annotation.get_window_extent" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the <aclass="reference internal" href="transformations.html#matplotlib.transforms.Bbox" title="matplotlib.transforms.Bbox"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Bbox</span></code></a> bounding the text and arrow, in display units.</p>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><dlclass="first last docutils">
<dt><strong>renderer</strong><spanclass="classifier">Renderer, optional</span></dt><dd><p>A renderer is needed to compute the bounding box. If the artist
has already been drawn, the renderer is cached; thus, it is only
necessary to pass this argument when calling <aclass="reference internal" href="#matplotlib.text.Annotation.get_window_extent" title="matplotlib.text.Annotation.get_window_extent"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">get_window_extent</span></code></a>
before the first <aclass="reference internal" href="#matplotlib.text.Annotation.draw" title="matplotlib.text.Annotation.draw"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">draw</span></code></a>. In practice, it is usually easier to
trigger a draw first (e.g. by saving the figure).</p>
</dd>
</dl>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.text.Annotation.set_anncoords">
<codeclass="descname">set_anncoords</code><spanclass="sig-paren">(</span><em>self</em>, <em>coords</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#Annotation.set_anncoords"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.Annotation.set_anncoords" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the coordinate system to use for <aclass="reference internal" href="#matplotlib.text.Annotation.xyann" title="matplotlib.text.Annotation.xyann"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Annotation.xyann</span></code></a>.</p>
<p>See also <em>xycoords</em> in <aclass="reference internal" href="#matplotlib.text.Annotation" title="matplotlib.text.Annotation"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Annotation</span></code></a>.</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.text.Annotation.set_figure">
<codeclass="descname">set_figure</code><spanclass="sig-paren">(</span><em>self</em>, <em>fig</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#Annotation.set_figure"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.Annotation.set_figure" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the <aclass="reference internal" href="_as_gen/matplotlib.figure.Figure.html#matplotlib.figure.Figure" title="matplotlib.figure.Figure"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Figure</span></code></a> instance the artist belongs to.</p>
<codeclass="descname">update_positions</code><spanclass="sig-paren">(</span><em>self</em>, <em>renderer</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#Annotation.update_positions"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.Annotation.update_positions" title="Permalink to this definition">¶</a></dt>
<dd><p>Update the pixel positions of the annotation text and the arrow patch.</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.text.Annotation.xyann">
<emclass="property">property </em><codeclass="descname">xyann</code><aclass="headerlink" href="#matplotlib.text.Annotation.xyann" title="Permalink to this definition">¶</a></dt>
<dd><p>The text position.</p>
<p>See also <em>xytext</em> in <aclass="reference internal" href="#matplotlib.text.Annotation" title="matplotlib.text.Annotation"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Annotation</span></code></a>.</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.text.Annotation.xycoords">
<emclass="property">property </em><codeclass="descname">xycoords</code><aclass="headerlink" href="#matplotlib.text.Annotation.xycoords" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dlclass="class">
<dtid="matplotlib.text.OffsetFrom">
<emclass="property">class </em><codeclass="descclassname">matplotlib.text.</code><codeclass="descname">OffsetFrom</code><spanclass="sig-paren">(</span><em>artist</em>, <em>ref_coord</em>, <em>unit='points'</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#OffsetFrom"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.OffsetFrom" title="Permalink to this definition">¶</a></dt>
<p>Callable helper class for working with <aclass="reference internal" href="#matplotlib.text.Annotation" title="matplotlib.text.Annotation"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Annotation</span></code></a>.</p>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><dlclass="first last docutils">
<dt><strong>artist</strong><spanclass="classifier"><aclass="reference internal" href="artist_api.html#matplotlib.artist.Artist" title="matplotlib.artist.Artist"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Artist</span></code></a> or <aclass="reference internal" href="transformations.html#matplotlib.transforms.BboxBase" title="matplotlib.transforms.BboxBase"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">BboxBase</span></code></a> or <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></span></dt><dd><p>The object to compute the offset from.</p>
</dd>
<dt><strong>ref_coord</strong><spanclass="classifier">(float, float)</span></dt><dd><p>If <em>artist</em> is an <aclass="reference internal" href="artist_api.html#matplotlib.artist.Artist" title="matplotlib.artist.Artist"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Artist</span></code></a> or <aclass="reference internal" href="transformations.html#matplotlib.transforms.BboxBase" title="matplotlib.transforms.BboxBase"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">BboxBase</span></code></a>, this values is
the location to of the offset origin in fractions of the
<em>artist</em> bounding box.</p>
<p>If <em>artist</em> is a transform, the offset origin is the
transform applied to this value.</p>
</dd>
<dt><strong>unit</strong><spanclass="classifier">{'points, 'pixels'}, default: 'points'</span></dt><dd><p>The screen units to use (pixels or points) for the offset input.</p>
</dd>
</dl>
</td>
</tr>
</tbody>
</table>
<dlclass="method">
<dtid="matplotlib.text.OffsetFrom.get_unit">
<codeclass="descname">get_unit</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#OffsetFrom.get_unit"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.OffsetFrom.get_unit" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the unit for input to the transform used by <codeclass="docutils literal notranslate"><spanclass="pre">__call__</span></code>.</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.text.OffsetFrom.set_unit">
<codeclass="descname">set_unit</code><spanclass="sig-paren">(</span><em>self</em>, <em>unit</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#OffsetFrom.set_unit"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.OffsetFrom.set_unit" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the unit for input to the transform used by <codeclass="docutils literal notranslate"><spanclass="pre">__call__</span></code>.</p>
<trclass="row-even"><td><aclass="reference internal" href="#matplotlib.text.Text.set_fontproperties" title="matplotlib.text.Text.set_fontproperties"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">fontproperties</span></code></a> or font or font_properties</td>
<td>{a numeric value in range 0-1000, 'ultra-condensed', 'extra-condensed', 'condensed', 'semi-condensed', 'normal', 'semi-expanded', 'expanded', 'extra-expanded', 'ultra-expanded'}</td>
<codeclass="descname">contains</code><spanclass="sig-paren">(</span><em>self</em>, <em>mouseevent</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#Text.contains"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.Text.contains" title="Permalink to this definition">¶</a></dt>
<dd><p>Return whether the mouse event occurred inside the axis-aligned
bounding-box of the text.</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.text.Text.draw">
<codeclass="descname">draw</code><spanclass="sig-paren">(</span><em>self</em>, <em>renderer</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#Text.draw"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.Text.draw" title="Permalink to this definition">¶</a></dt>
<dd><p>Draw the Artist (and its children) using the given renderer.</p>
<p>This has no effect if the artist is not visible (<aclass="reference internal" href="_as_gen/matplotlib.artist.Artist.get_visible.html#matplotlib.artist.Artist.get_visible" title="matplotlib.artist.Artist.get_visible"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Artist.get_visible</span></code></a>
<p>This method is overridden in the Artist subclasses.</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.text.Text.get_bbox_patch">
<codeclass="descname">get_bbox_patch</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#Text.get_bbox_patch"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.Text.get_bbox_patch" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the bbox Patch, or None if the <aclass="reference internal" href="_as_gen/matplotlib.patches.FancyBboxPatch.html#matplotlib.patches.FancyBboxPatch" title="matplotlib.patches.FancyBboxPatch"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">patches.FancyBboxPatch</span></code></a>
is not made.</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.text.Text.get_c">
<codeclass="descname">get_c</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.text.Text.get_c" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_color</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#Text.get_color"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.Text.get_color" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the color of the text.</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.text.Text.get_family">
<codeclass="descname">get_family</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.text.Text.get_family" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_font</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.text.Text.get_font" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_font_properties</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.text.Text.get_font_properties" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_fontfamily</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#Text.get_fontfamily"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.Text.get_fontfamily" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the list of font families used for font lookup.</p>
<codeclass="descname">get_fontname</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#Text.get_fontname"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.Text.get_fontname" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_fontproperties</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#Text.get_fontproperties"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.Text.get_fontproperties" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_fontsize</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#Text.get_fontsize"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.Text.get_fontsize" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_fontstyle</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#Text.get_fontstyle"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.Text.get_fontstyle" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_fontvariant</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#Text.get_fontvariant"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.Text.get_fontvariant" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_fontweight</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#Text.get_fontweight"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.Text.get_fontweight" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the font weight as a string or a number.</p>
<codeclass="descname">get_ha</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.text.Text.get_ha" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_horizontalalignment</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#Text.get_horizontalalignment"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.Text.get_horizontalalignment" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the horizontal alignment as a string. Will be one of
'left', 'center' or 'right'.</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.text.Text.get_name">
<codeclass="descname">get_name</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.text.Text.get_name" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_position</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#Text.get_position"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.Text.get_position" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the (x, y) position of the text.</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.text.Text.get_prop_tup">
<codeclass="descname">get_prop_tup</code><spanclass="sig-paren">(</span><em>self</em>, <em>renderer=None</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#Text.get_prop_tup"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.Text.get_prop_tup" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a hashable tuple of properties.</p>
<p>Not intended to be human readable, but useful for backends who
want to cache derived information about text (e.g., layouts) and
need to know if the text has changed.</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.text.Text.get_rotation">
<codeclass="descname">get_rotation</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#Text.get_rotation"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.Text.get_rotation" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the text angle in degrees between 0 and 360.</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.text.Text.get_rotation_mode">
<codeclass="descname">get_rotation_mode</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#Text.get_rotation_mode"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.Text.get_rotation_mode" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the text rotation mode.</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.text.Text.get_size">
<codeclass="descname">get_size</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.text.Text.get_size" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_stretch</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#Text.get_stretch"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.Text.get_stretch" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the font stretch as a string or a number.</p>
<codeclass="descname">get_style</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.text.Text.get_style" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_text</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#Text.get_text"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.Text.get_text" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_unitless_position</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#Text.get_unitless_position"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.Text.get_unitless_position" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the (x, y) unitless position of the text.</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.text.Text.get_usetex">
<codeclass="descname">get_usetex</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#Text.get_usetex"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.Text.get_usetex" title="Permalink to this definition">¶</a></dt>
<dd><p>Return whether this <aclass="reference internal" href="#matplotlib.text.Text" title="matplotlib.text.Text"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Text</span></code></a> object uses TeX for rendering.</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.text.Text.get_va">
<codeclass="descname">get_va</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.text.Text.get_va" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_variant</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.text.Text.get_variant" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_verticalalignment</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#Text.get_verticalalignment"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.Text.get_verticalalignment" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the vertical alignment as a string. Will be one of
'top', 'center', 'bottom' or 'baseline'.</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.text.Text.get_weight">
<codeclass="descname">get_weight</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.text.Text.get_weight" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_window_extent</code><spanclass="sig-paren">(</span><em>self</em>, <em>renderer=None</em>, <em>dpi=None</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#Text.get_window_extent"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.Text.get_window_extent" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the <aclass="reference internal" href="transformations.html#matplotlib.transforms.Bbox" title="matplotlib.transforms.Bbox"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Bbox</span></code></a> bounding the text, in display units.</p>
<p>In addition to being used internally, this is useful for specifying
clickable regions in a png file on a web page.</p>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><dlclass="first last docutils">
<dt><strong>renderer</strong><spanclass="classifier">Renderer, optional</span></dt><dd><p>A renderer is needed to compute the bounding box. If the artist
has already been drawn, the renderer is cached; thus, it is only
necessary to pass this argument when calling <aclass="reference internal" href="#matplotlib.text.Text.get_window_extent" title="matplotlib.text.Text.get_window_extent"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">get_window_extent</span></code></a>
before the first <aclass="reference internal" href="#matplotlib.text.Text.draw" title="matplotlib.text.Text.draw"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">draw</span></code></a>. In practice, it is usually easier to
trigger a draw first (e.g. by saving the figure).</p>
</dd>
<dt><strong>dpi</strong><spanclass="classifier">float, optional</span></dt><dd><p>The dpi value for computing the bbox, defaults to
<codeclass="docutils literal notranslate"><spanclass="pre">self.figure.dpi</span></code> (<em>not</em> the renderer dpi); should be set e.g. if
to match regions with a figure saved with a custom dpi value.</p>