<divid="unreleased-message"> You are reading an old version of the documentation (v3.3.1). For the latest version see <ahref="https://matplotlib.org/stable/api/texmanager_api.html">https://matplotlib.org/stable/api/texmanager_api.html</a></div>
<spanid="matplotlib-texmanager"></span><h1><codeclass="docutils literal notranslate"><spanclass="pre">matplotlib.texmanager</span></code><aclass="headerlink" href="#module-matplotlib.texmanager" title="Permalink to this headline">¶</a></h1>
<p>Support for embedded TeX expressions in Matplotlib via dvipng and dvips for the
raster and PostScript backends. The tex and dvipng/dvips information is cached
in ~/.matplotlib/tex.cache for reuse between sessions.</p>
<p>Requirements:</p>
<ulclass="simple">
<li>latex</li>
<li>*Agg backends: dvipng>=1.6</li>
<li>PS backend: psfrag, dvips, and Ghostscript>=8.60</li>
</ul>
<p>Backends:</p>
<ulclass="simple">
<li>*Agg</li>
<li>PS</li>
<li>PDF</li>
</ul>
<p>For raster output, you can get RGBA numpy arrays from TeX expressions
<emclass="property">class </em><codeclass="descclassname">matplotlib.texmanager.</code><codeclass="descname">TexManager</code><aclass="reference internal" href="../_modules/matplotlib/texmanager.html#TexManager"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.texmanager.TexManager" title="Permalink to this definition">¶</a></dt>
<emclass="property">property </em><codeclass="descname">cachedir</code><aclass="headerlink" href="#matplotlib.texmanager.TexManager.cachedir" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="py method">
<dtid="matplotlib.texmanager.TexManager.cursive">
<emclass="property">property </em><codeclass="descname">cursive</code><aclass="headerlink" href="#matplotlib.texmanager.TexManager.cursive" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">font_family</code><emclass="property"> = 'serif'</em><aclass="headerlink" href="#matplotlib.texmanager.TexManager.font_family" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_custom_preamble</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/texmanager.html#TexManager.get_custom_preamble"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.texmanager.TexManager.get_custom_preamble" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a string containing user additions to the tex preamble.</p>
<codeclass="descname">get_font_config</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/texmanager.html#TexManager.get_font_config"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.texmanager.TexManager.get_font_config" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_font_preamble</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/texmanager.html#TexManager.get_font_preamble"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.texmanager.TexManager.get_font_preamble" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a string containing font configuration for the tex preamble.</p>
<codeclass="descname">make_dvi</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">tex</span></em>, <em><spanclass="n">fontsize</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/texmanager.html#TexManager.make_dvi"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.texmanager.TexManager.make_dvi" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate a dvi file containing latex's layout of tex string.</p>
<codeclass="descname">make_dvi_preview</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">tex</span></em>, <em><spanclass="n">fontsize</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/texmanager.html#TexManager.make_dvi_preview"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.texmanager.TexManager.make_dvi_preview" title="Permalink to this definition">¶</a></dt>
<dd><p>[<em>Deprecated</em>] Generate a dvi file containing latex's layout of tex string.</p>
<p>It calls make_tex_preview() method and store the size information
(width, height, descent) in a separate file.</p>
<p>Return the file name.</p>
<pclass="rubric">Notes</p>
<divclass="deprecated">
<p><spanclass="versionmodified deprecated">Deprecated since version 3.3.</span></p>
<codeclass="descname">make_tex</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">tex</span></em>, <em><spanclass="n">fontsize</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/texmanager.html#TexManager.make_tex"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.texmanager.TexManager.make_tex" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate a tex file to render the tex string at a specific font size.</p>
<codeclass="descname">make_tex_preview</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">tex</span></em>, <em><spanclass="n">fontsize</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/texmanager.html#TexManager.make_tex_preview"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.texmanager.TexManager.make_tex_preview" title="Permalink to this definition">¶</a></dt>
<dd><p>[<em>Deprecated</em>] Generate a tex file to render the tex string at a specific font size.</p>
<p>It uses the preview.sty to determine the dimension (width, height,
descent) of the output.</p>
<p>Return the file name.</p>
<pclass="rubric">Notes</p>
<divclass="deprecated">
<p><spanclass="versionmodified deprecated">Deprecated since version 3.3.</span></p>
<emclass="property">property </em><codeclass="descname">monospace</code><aclass="headerlink" href="#matplotlib.texmanager.TexManager.monospace" title="Permalink to this definition">¶</a></dt>
<emclass="property">property </em><codeclass="descname">rgba_arrayd</code><aclass="headerlink" href="#matplotlib.texmanager.TexManager.rgba_arrayd" title="Permalink to this definition">¶</a></dt>
<emclass="property">property </em><codeclass="descname">sans_serif</code><aclass="headerlink" href="#matplotlib.texmanager.TexManager.sans_serif" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="py method">
<dtid="matplotlib.texmanager.TexManager.serif">
<emclass="property">property </em><codeclass="descname">serif</code><aclass="headerlink" href="#matplotlib.texmanager.TexManager.serif" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">texcache</code><emclass="property"> = '/root/.cache/matplotlib/tex.cache'</em><aclass="headerlink" href="#matplotlib.texmanager.TexManager.texcache" title="Permalink to this definition">¶</a></dt>