<spanid="tutorials-text"></span><spanid="sphx-glr-tutorials-text"></span><h1>Text<aclass="headerlink" href="#text" title="Permalink to this headline">#</a></h1>
<p>matplotlib has extensive text support, including support for
mathematical expressions, truetype support for raster and
vector outputs, newline separated text with arbitrary
rotations, and unicode support. These tutorials cover
the basics of working with text in Matplotlib.</p>
<divclass="sphx-glr-thumbnails"><divclass="sphx-glr-thumbcontainer" tooltip="Introduction to plotting and working with text in Matplotlib."><imgalt="Text in Matplotlib Plots" src="../../_images/sphx_glr_text_intro_thumb.png" />
<p><aclass="reference internal" href="text_intro.html#sphx-glr-tutorials-text-text-intro-py"><spanclass="std std-ref">Text in Matplotlib Plots</span></a></p>
<divclass="sphx-glr-thumbnail-title">Text in Matplotlib Plots</div>
</div><divclass="sphx-glr-thumbcontainer" tooltip="Controlling properties of text and its layout with Matplotlib."><imgalt="Text properties and layout" src="../../_images/sphx_glr_text_props_thumb.png" />
<p><aclass="reference internal" href="text_props.html#sphx-glr-tutorials-text-text-props-py"><spanclass="std std-ref">Text properties and layout</span></a></p>
<divclass="sphx-glr-thumbnail-title">Text properties and layout</div>
</div><divclass="sphx-glr-thumbcontainer" tooltip="Annotating text with Matplotlib."><imgalt="Annotations" src="../../_images/sphx_glr_annotations_thumb.png" />
</div><divclass="sphx-glr-thumbcontainer" tooltip="You can use a subset of TeX markup in any Matplotlib text string by placing it inside a pair of..."><imgalt="Writing mathematical expressions" src="../../_images/sphx_glr_mathtext_thumb.png" />
</div><divclass="sphx-glr-thumbcontainer" tooltip="Using the pgf backend, Matplotlib can export figures as pgf drawing commands that can be proces..."><imgalt="Typesetting with XeLaTeX/LuaLaTeX via the ``pgf`` backend" src="../../_images/sphx_glr_pgf_thumb.png" />
<p><aclass="reference internal" href="pgf.html#sphx-glr-tutorials-text-pgf-py"><spanclass="std std-ref">Typesetting with XeLaTeX/LuaLaTeX via the pgf backend</span></a></p>
<divclass="sphx-glr-thumbnail-title">Typesetting with XeLaTeX/LuaLaTeX via the ``pgf`` backend</div>
</div><divclass="sphx-glr-thumbcontainer" tooltip="Matplotlib can use LaTeX to render text. This is activated by setting text.usetex : True in yo..."><imgalt="Text rendering with LaTeX" src="../../_images/sphx_glr_usetex_thumb.png" />
<p><aclass="reference internal" href="usetex.html#sphx-glr-tutorials-text-usetex-py"><spanclass="std std-ref">Text rendering with LaTeX</span></a></p>
<divclass="sphx-glr-thumbnail-title">Text rendering with LaTeX</div>
</div></div><divclass="toctree-wrapper compound">
</div>
</section>
</div>
</main>
</div>
</div>
<!-- Scripts loaded after <body> so the DOM is not blocked -->
<divid="unreleased-message"> You are reading an old version of the documentation (v3.5.3). For the latest version see <ahref="https://matplotlib.org/stable/tutorials/text/index.html">https://matplotlib.org/stable/tutorials/text/index.html</a></div>