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 (v2.2.4). For the latest version see <ahref="https://matplotlib.org/stable/api/text_api.html">https://matplotlib.org/stable/api/text_api.html</a></div>
<p>Annotate the point <codeclass="docutils literal notranslate"><spanclass="pre">xy</span></code> with text <codeclass="docutils literal notranslate"><spanclass="pre">s</span></code>.</p>
<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><pclass="first last">Length 2 sequence specifying the <em>(x,y)</em> to place the text
at. If None, defaults to <codeclass="docutils literal notranslate"><spanclass="pre">xy</span></code>.</p>
</dd>
<dt><strong>xycoords</strong><spanclass="classifier-delimiter">:</span><spanclass="classifier">str, Artist, Transform, callable or tuple, optional</span></dt>
<dd><pclass="first">The coordinate system that <codeclass="docutils literal notranslate"><spanclass="pre">xy</span></code> is given in.</p>
<p>For a <aclass="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">str</span></code></a> the allowed values are:</p>
<tableborder="1" class="docutils">
<colgroup>
<colwidth="27%" />
<colwidth="73%" />
</colgroup>
<theadvalign="bottom">
<trclass="row-odd"><thclass="head">Property</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>
<p>If a <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> object is passed in the units are
fraction if it's bounding box.</p>
<p>If 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> object is passed
in use that to transform <codeclass="docutils literal notranslate"><spanclass="pre">xy</span></code> to screen coordinates</p>
and return 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> or
<p>If a <aclass="reference external" href="https://docs.python.org/3/library/stdtypes.html#tuple" title="(in Python v3.7)"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">tuple</span></code></a> must be length 2 tuple of str, <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Artist</span></code>,
<codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Transform</span></code> or callable objects. The first transform is
used for the <em>x</em> coordinate and the second for <em>y</em>.</p>
<p>See <aclass="reference internal" href="../tutorials/text/annotations.html#plotting-guide-annotation"><spanclass="std std-ref">Advanced Annotation</span></a> for more details.</p>
<pclass="last">Defaults to <codeclass="docutils literal notranslate"><spanclass="pre">'data'</span></code></p>
<p>If <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">arrowprops</span></code> does not contain the key <codeclass="docutils literal notranslate"><spanclass="pre">'arrowstyle'</span></code> the
allowed keys are:</p>
<tableborder="1" class="docutils">
<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>
<p>If the <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">arrowprops</span></code> contains the key <codeclass="docutils literal notranslate"><spanclass="pre">'arrowstyle'</span></code> the
<dd><pclass="first">Controls the visibility of the annotation when it goes
outside the axes area.</p>
<p>If <aclass="reference external" href="https://docs.python.org/3/library/constants.html#True" title="(in Python v3.7)"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">True</span></code></a>, the annotation will only be drawn when the
<codeclass="docutils literal notranslate"><spanclass="pre">xy</span></code> is inside the axes. If <aclass="reference external" href="https://docs.python.org/3/library/constants.html#False" title="(in Python v3.7)"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">False</span></code></a>, the annotation will
always be drawn regardless of its position.</p>
<pclass="last">The default is <aclass="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.7)"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">None</span></code></a>, which behave as <aclass="reference external" href="https://docs.python.org/3/library/constants.html#True" title="(in Python v3.7)"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">True</span></code></a> only if
<em>xycoords</em> is "data".</p>
</dd>
</dl>
</td>
</tr>
<trclass="field-even field"><thclass="field-name">Returns:</th><tdclass="field-body"><dlclass="first last docutils">
<dt><strong>Annotation</strong></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<dlclass="attribute">
<dtid="matplotlib.text.Annotation.anncoords">
<codeclass="descname">anncoords</code><aclass="headerlink" href="#matplotlib.text.Annotation.anncoords" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="method">
<dtid="matplotlib.text.Annotation.contains">
<codeclass="descname">contains</code><spanclass="sig-paren">(</span><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>Test whether the mouse event occurred in the patch.</p>
<p>In the case of text, a hit is true anywhere in the
axis-aligned bounding-box containing the text.</p>
<p>Returns True or False.</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.text.Annotation.draw">
<codeclass="descname">draw</code><spanclass="sig-paren">(</span><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 <aclass="reference internal" href="#matplotlib.text.Annotation" title="matplotlib.text.Annotation"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Annotation</span></code></a> object to the given <em>renderer</em>.</p>
<codeclass="descname">get_window_extent</code><spanclass="sig-paren">(</span><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>
the text and arrow annotation, in display units.</p>
<p><em>renderer</em> defaults to the _renderer attribute of the text
object. This is not assigned until the first execution of
<aclass="reference internal" href="#matplotlib.text.Annotation.draw" title="matplotlib.text.Annotation.draw"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">draw()</span></code></a>, so you must use this kwarg if you want
to call <aclass="reference internal" href="#matplotlib.text.Annotation.get_window_extent" title="matplotlib.text.Annotation.get_window_extent"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">get_window_extent()</span></code></a> prior to the first
<aclass="reference internal" href="#matplotlib.text.Annotation.draw" title="matplotlib.text.Annotation.draw"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">draw()</span></code></a>. For getting web page regions, it is
simpler to call the method after saving the figure. The
<em>dpi</em> used defaults to self.figure.dpi; the renderer dpi is
irrelevant.</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.text.Annotation.set_figure">
<codeclass="descname">set_figure</code><spanclass="sig-paren">(</span><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>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 annotated point and the
text.</p>
</dd></dl>
<dlclass="attribute">
<dtid="matplotlib.text.Annotation.xyann">
<codeclass="descname">xyann</code><aclass="headerlink" href="#matplotlib.text.Annotation.xyann" 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>
<dd><pclass="first">If <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">artist</span></code> is an <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Artist</span></code> or <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">BboxBase</span></code>, this values is
the location to of the offset origin in fractions of the
<pclass="last">If <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">artist</span></code> is a transform, the offset origin is the
<dd><pclass="first last">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><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>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>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>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_family" title="matplotlib.text.Text.set_family"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">family</span></code></a> or fontfamily or fontname or name</td>
<codeclass="descname">contains</code><spanclass="sig-paren">(</span><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>Test whether the mouse event occurred in the patch.</p>
<p>In the case of text, a hit is true anywhere in the
axis-aligned bounding-box containing the text.</p>
<p>Returns True or False.</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.text.Text.draw">
<codeclass="descname">draw</code><spanclass="sig-paren">(</span><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>Draws the <aclass="reference internal" href="#matplotlib.text.Text" title="matplotlib.text.Text"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Text</span></code></a> object to the given <em>renderer</em>.</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.text.Text.get_bbox_patch">
<codeclass="descname">get_bbox_patch</code><spanclass="sig-paren">(</span><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 object. Returns None if the
FancyBboxPatch is not made.</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.text.Text.get_color">
<codeclass="descname">get_color</code><spanclass="sig-paren">(</span><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><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#Text.get_family"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.Text.get_family" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the list of font families used for font lookup</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.text.Text.get_font_properties">
<codeclass="descname">get_font_properties</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#Text.get_font_properties"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.Text.get_font_properties" title="Permalink to this definition">¶</a></dt>
<dd><p>alias for get_fontproperties</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.text.Text.get_fontfamily">
<codeclass="descname">get_fontfamily</code><spanclass="sig-paren">(</span><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>alias for get_family</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.text.Text.get_fontname">
<codeclass="descname">get_fontname</code><spanclass="sig-paren">(</span><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>
<dd><p>alias for get_name</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.text.Text.get_fontproperties">
<codeclass="descname">get_fontproperties</code><spanclass="sig-paren">(</span><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>
<dd><p>Return the <codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">FontProperties</span></code> object</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.text.Text.get_fontsize">
<codeclass="descname">get_fontsize</code><spanclass="sig-paren">(</span><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>
<dd><p>alias for get_size</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.text.Text.get_fontstretch">
<codeclass="descname">get_fontstretch</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#Text.get_fontstretch"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.Text.get_fontstretch" title="Permalink to this definition">¶</a></dt>
<dd><p>alias for get_stretch</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.text.Text.get_fontstyle">
<codeclass="descname">get_fontstyle</code><spanclass="sig-paren">(</span><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>
<dd><p>alias for get_style</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.text.Text.get_fontvariant">
<codeclass="descname">get_fontvariant</code><spanclass="sig-paren">(</span><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>
<dd><p>alias for get_variant</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.text.Text.get_fontweight">
<codeclass="descname">get_fontweight</code><spanclass="sig-paren">(</span><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>alias for get_weight</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.text.Text.get_ha">
<codeclass="descname">get_ha</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#Text.get_ha"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.Text.get_ha" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_horizontalalignment</code><spanclass="sig-paren">(</span><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 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><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#Text.get_name"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.Text.get_name" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the font name as string</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.text.Text.get_position">
<codeclass="descname">get_position</code><spanclass="sig-paren">(</span><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 position of the text as a tuple (<em>x</em>, <em>y</em>)</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.text.Text.get_prop_tup">
<codeclass="descname">get_prop_tup</code><spanclass="sig-paren">(</span><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><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 as float in degrees</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.text.Text.get_rotation_mode">
<codeclass="descname">get_rotation_mode</code><spanclass="sig-paren">(</span><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>get text rotation mode</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.text.Text.get_size">
<codeclass="descname">get_size</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#Text.get_size"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.Text.get_size" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the font size as integer</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.text.Text.get_stretch">
<codeclass="descname">get_stretch</code><spanclass="sig-paren">(</span><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>Get the font stretch as a string or number</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.text.Text.get_style">
<codeclass="descname">get_style</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#Text.get_style"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.Text.get_style" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the font style as string</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.text.Text.get_text">
<codeclass="descname">get_text</code><spanclass="sig-paren">(</span><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><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 unitless position of the text as a tuple (<em>x</em>, <em>y</em>)</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.text.Text.get_usetex">
<codeclass="descname">get_usetex</code><spanclass="sig-paren">(</span><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>
<p>If the user has not manually set this value, it defaults to
<codeclass="descname">get_va</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#Text.get_va"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.Text.get_va" title="Permalink to this definition">¶</a></dt>
<dd><p>alias for <codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">getverticalalignment()</span></code></p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.text.Text.get_variant">
<codeclass="descname">get_variant</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#Text.get_variant"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.Text.get_variant" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_verticalalignment</code><spanclass="sig-paren">(</span><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 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><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#Text.get_weight"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.Text.get_weight" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the font weight as string or number</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.text.Text.get_window_extent">
<codeclass="descname">get_window_extent</code><spanclass="sig-paren">(</span><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>
<p>In addition to being used internally, this is useful for
specifying clickable regions in a png file on a web page.</p>
<p><em>renderer</em> defaults to the _renderer attribute of the text
object. This is not assigned until the first execution of
<aclass="reference internal" href="#matplotlib.text.Text.draw" title="matplotlib.text.Text.draw"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">draw()</span></code></a>, so you must use this kwarg if you want
to call <aclass="reference internal" href="#matplotlib.text.Text.get_window_extent" title="matplotlib.text.Text.get_window_extent"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">get_window_extent()</span></code></a> prior to the first
<aclass="reference internal" href="#matplotlib.text.Text.draw" title="matplotlib.text.Text.draw"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">draw()</span></code></a>. For getting web page regions, it is
simpler to call the method after saving the figure.</p>
<p><em>dpi</em> defaults to self.figure.dpi; the renderer dpi is
irrelevant. For the web application, if figure.dpi is not
the value used when saving the figure, then the value that
was used must be specified as the <em>dpi</em> argument.</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.text.Text.get_wrap">
<codeclass="descname">get_wrap</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#Text.get_wrap"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.Text.get_wrap" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the wrapping state for the text.</p>
</dd></dl>
<dlclass="staticmethod">
<dtid="matplotlib.text.Text.is_math_text">
<emclass="property">static </em><codeclass="descname">is_math_text</code><spanclass="sig-paren">(</span><em>s</em>, <em>usetex=None</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#Text.is_math_text"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.Text.is_math_text" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a cleaned string and a boolean flag.
The flag indicates if the given string <em>s</em> contains any mathtext,
determined by counting unescaped dollar signs. If no mathtext
is present, the cleaned string has its dollar signs unescaped.
If usetex is on, the flag always has the value "TeX".</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.text.Text.set_backgroundcolor">
<codeclass="descname">set_backgroundcolor</code><spanclass="sig-paren">(</span><em>color</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#Text.set_backgroundcolor"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.Text.set_backgroundcolor" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the background color of the text by updating the bbox.</p>
<dd>To change the position of the bounding box.</dd>
</dl>
</div>
<p>ACCEPTS: any matplotlib color</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.text.Text.set_bbox">
<codeclass="descname">set_bbox</code><spanclass="sig-paren">(</span><em>rectprops</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#Text.set_bbox"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.Text.set_bbox" title="Permalink to this definition">¶</a></dt>
<dd><p>Draw a bounding box around self. rectprops are any settable
properties for a FancyBboxPatch, e.g., facecolor='red', alpha=0.5.</p>
scale of the FancyBboxPatch is set to the fontsize.</p>
<p>ACCEPTS: FancyBboxPatch prop dict</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.text.Text.set_clip_box">
<codeclass="descname">set_clip_box</code><spanclass="sig-paren">(</span><em>clipbox</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#Text.set_clip_box"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.Text.set_clip_box" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">set_clip_on</code><spanclass="sig-paren">(</span><em>b</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#Text.set_clip_on"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.Text.set_clip_on" title="Permalink to this definition">¶</a></dt>
<dd><p>Set whether artist uses clipping.</p>
<p>When False, artists will be visible outside of the axes, which can lead
<codeclass="descname">set_clip_path</code><spanclass="sig-paren">(</span><em>path</em>, <em>transform=None</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#Text.set_clip_path"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.Text.set_clip_path" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the artist's clip path, which may be:</p>
<codeclass="descname">set_color</code><spanclass="sig-paren">(</span><em>color</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#Text.set_color"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.Text.set_color" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the foreground color of the text</p>
<p>ACCEPTS: any matplotlib color</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.text.Text.set_family">
<codeclass="descname">set_family</code><spanclass="sig-paren">(</span><em>fontname</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#Text.set_family"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.Text.set_family" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the font family. May be either a single string, or a list
of strings in decreasing priority. Each string may be either
a real font name or a generic font class name. If the latter,
<codeclass="descname">set_font_properties</code><spanclass="sig-paren">(</span><em>fp</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/text.html#Text.set_font_properties"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.text.Text.set_font_properties" title="Permalink to this definition">¶</a></dt>