<html>
<head>
<title>Matplotlib - matlab style python plotting (plots, graphs,
charts) </title>
</head>
<body bgcolor=#ffffff>
<table >
<tr>
<td colspan=3 valign=top align=left><img align=left
src=screenshots/logo.png></td></td>
</tr>
<tr>
<td valign=top>
<table border=0 >
<tr><td valign=top>
<table width=100% border=1 cellpadding=1 cellspacing=1>
<tr><td bgcolor=#bfbfbf align="left">
<font class="tableheading">
<b>Matplotlib</b>
</font>
</td></tr>
<tr><td valign="top" bgcolor=#efefef>
<a href=http://matplotlib.sourceforge.net>Home</a><br>
<a href=http://sourceforge.net/projects/matplotlib>Download</a><br>
<a href=installing.html>Installing</a><br>
<a href=screenshots.html>Screenshots</a><br>
<a href=whats_new.html>What's New</a><br>
<a href=http://sourceforge.net/mail/?group_id=80706>Mailing lists</a><br>
</td></tr>
</table>
<br>
<table width=100% border=1 cellpadding=1 cellspacing=1>
<tr><td bgcolor=#bfbfbf align="left">
<font class="tableheading">
<b>Documentation</b>
</font>
</td></tr>
<tr><td valign="top" bgcolor=#efefef>
<a href=tutorial.html>Tutorial</a><br>
<a href=faq.html>FAQ</a><br>
<a href=matlab_commands.html>Matlab interface</a><br>
<a href=classdocs.html>Class library</a><br>
<a href=backends.html>Backends</a><br>
<a href=fonts.html>Fonts</a><br>
<a href=interactive.html>Interactive</a><br>
<a href=goals.html>Goals</a><br>
</td></tr>
</table>
<br>
<table width=100% border=1 cellpadding=1 cellspacing=1>
<tr><td bgcolor=#bfbfbf align="left">
<font class="tableheading">
<b>Other</b>
</font>
</td></tr>
<tr><td valign="top" bgcolor=#efefef>
<a href=credits.html>Credits</a><br>
<a href=license.html>License</a><br>
</td></tr>
</table>
<br>
</td>
</tr>
</table>
</td>
<td valign=top> </td>
<td valign=top>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="matplotlib.html"><font color="#ffffff">matplotlib</font></a>.mathtext</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/usr/local/lib/python2.3/site-packages/matplotlib/mathtext.py">/usr/local/lib/python2.3/site-packages/matplotlib/mathtext.py</a></font></td></tr></table>
<p><tt>OVERVIEW <br>
<br>
mathtext is a module for parsing TeX expressions and drawing them<br>
into a matplotlib.ft2font image buffer. You can draw from this<br>
buffer into your backend.<br>
<br>
A large set of the TeX symbols are provided (see below).<br>
Subscripting and superscripting are supported, as well as the<br>
over/under style of subscripting with \sum, \int, etc.<br>
<br>
The module uses pyparsing to parse the TeX expression, an so can<br>
handle fairly complex TeX expressions Eg, the following renders<br>
correctly<br>
<br>
s = r'$\cal{R}\prod_{i=\alpha\cal{B}}^\infty a_i\rm{sin}(2 \pi f x_i)$'<br>
<br>
The fonts \cal, \rm, \it, and \tt are allowed.<br>
<br>
If you find TeX expressions that don't parse or render properly,<br>
please email me, but please check KNOWN ISSUES below first.<br>
<br>
REQUIREMENTS<br>
<br>
mathtext requires matplotlib.ft2font. Set BUILD_FT2FONT=True in<br>
setup.py. See BACKENDS below for a summary of availability by<br>
backend.<br>
<br>
LICENSING:<br>
<br>
The computer modern fonts this package uses are part of the BaKoMa<br>
fonts, which are (in my understanding) free for noncommercial use.<br>
For commercial use, please consult the licenses in fonts/ttf and the<br>
author Basil K. Malyshev - see also<br>
<a href="http://www.mozilla.org/projects/mathml/fonts/encoding/license-bakoma.txt">http://www.mozilla.org/projects/mathml/fonts/encoding/license-bakoma.txt</a><br>
<br>
USAGE:<br>
<br>
See <a href="http://matplotlib.sourceforge.net/tutorial.html#mathtext">http://matplotlib.sourceforge.net/tutorial.html#mathtext</a> for a<br>
tutorial introduction.<br>
<br>
Any text element (xlabel, ylabel, title, text, etc) can use TeX<br>
markup, as in<br>
<br>
xlabel(r'$\Delta_i$')<br>
^<br>
use raw strings<br>
<br>
The $ symbols must be the first and last symbols in the string. Eg,<br>
you cannot do <br>
<br>
r'My label $x_i$'. <br>
<br>
But you can change fonts, as in <br>
<br>
r'\rm{My label} x_i' <br>
<br>
to achieve the same effect.<br>
<br>
A large set of the TeX symbols are provided. Subscripting and<br>
superscripting are supported, as well as the over/under style of<br>
subscripting with \sum, \int, etc.<br>
<br>
<br>
Allowed TeX symbols:<br>
<br>
\Delta \Downarrow \Gamma \Im \LEFTangle \LEFTbrace \LEFTbracket<br>
\LEFTparen \Lambda \Leftarrow \Leftbrace \Leftbracket \Leftparen<br>
\Leftrightarrow \Omega \P \Phi \Pi \Psi \RIGHTangle \RIGHTbrace<br>
\RIGHTbracket \RIGHTparen \Re \Rightarrow \Rightbrace \Rightbracket<br>
\Rightparen \S \SQRT \Sigma \Sqrt \Theta \Uparrow \Updownarrow<br>
\Upsilon \Vert \Xi \aleph \alpha \approx \ast \asymp \backslash<br>
\beta \bigcap \bigcirc \bigcup \bigodot \bigoplus \bigotimes<br>
\bigtriangledown \bigtriangleup \biguplus \bigvee \bigwedge \bot<br>
\bullet \cap \cdot \chi \circ \clubsuit \coprod \cup \dag \dashv<br>
\ddag \delta \diamond \diamondsuit \div \downarrow \ell \emptyset<br>
\epsilon \equiv \eta \exists \flat \forall \frown \gamma \geq \gg<br>
\heartsuit \imath \in \infty \int \iota \jmath \kappa \lambda<br>
\langle \lbrace \lceil \leftangle \leftarrow \leftbrace \leftbracket<br>
\leftharpoondown \leftharpoonup \leftparen \leftrightarrow \leq<br>
\lfloor \ll \mid \mp \mu \nabla \natural \nearrow \neg \ni \nu<br>
\nwarrow \odot \oint \omega \ominus \oplus \oslash \otimes \phi \pi<br>
\pm \prec \preceq \prime \prod \propto \psi \rangle \rbrace \rceil<br>
\rfloor \rho \rightangle \rightarrow \rightbrace \rightbracket<br>
\rightharpoondown \rightharpoonup \rightparen \searrow \sharp \sigma<br>
\sim \simeq \slash \smile \spadesuit \sqcap \sqcup \sqrt \sqsubseteq<br>
\sqsupseteq \subset \subseteq \succ \succeq \sum \supset \supseteq<br>
\swarrow \tau \theta \times \top \triangleleft \triangleright<br>
\uparrow \updownarrow \uplus \upsilon \varepsilon \varphi \varphi<br>
\varrho \varsigma \vartheta \vdash \vee \wedge \wp \wr \xi \zeta<br>
<br>
<br>
BACKENDS<br>
<br>
mathtext currently works with GTK, Agg, GTKAgg, TkAgg and WxAgg. If<br>
David incorporates ft2font into paint, it will be easy to add to<br>
Paint. WX can follow the lead of GTK and use pixels API calls to<br>
use mathtext.<br>
<br>
PS will require more substantial work, doing the metrics and<br>
layouts with the AFM versions of the computer modern fonts.<br>
Backends which don't support mathtext will just render the TeX<br>
string as a literal. Stay tuned.<br>
<br>
<br>
KNOWN ISSUES:<br>
<br>
- some hackish ways I deal with a strange offset in cmex10<br>
- nested subscripts, eg, x_i_i not working<br>
- nesting fonts changes in sub/superscript groups not parsing<br>
- I would also like to add a few more layout commands, like \frac.<br>
<br>
Author : John Hunter <jdhunter@ace.bsd.uchicago.edu><br>
Copyright : John Hunter (2004)<br>
License : matplotlib license (PSF compatible)</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom> <br>
<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="os.html">os</a><br>
</td><td width="25%" valign=top><a href="sys.html">sys</a><br>
</td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="matplotlib.mathtext.html#Handler">Handler</a>
</font></dt><dt><font face="helvetica, arial"><a href="matplotlib.mathtext.html#MathText">MathText</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="matplotlib.mathtext.html#Expr">Expr</a>
</font></dt><dt><font face="helvetica, arial"><a href="matplotlib.mathtext.html#Font">Font</a>
</font></dt><dt><font face="helvetica, arial"><a href="matplotlib.mathtext.html#Grp">Grp</a>
</font></dt><dt><font face="helvetica, arial"><a href="matplotlib.mathtext.html#Single">Single</a>
</font></dt><dt><font face="helvetica, arial"><a href="matplotlib.mathtext.html#SubSup">SubSup</a>
</font></dt></dl>
</dd>
</dl>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="Expr">class <strong>Expr</strong></a>(<a href="matplotlib.mathtext.html#MathText">MathText</a>)</font></td></tr>
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Expr-__init__"><strong>__init__</strong></a>(self, objs)</dt></dl>
<dl><dt><a name="Expr-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
<dl><dt><a name="Expr-get_children"><strong>get_children</strong></a>(self)</dt></dl>
<hr>
Methods inherited from <a href="matplotlib.mathtext.html#MathText">MathText</a>:<br>
<dl><dt><a name="Expr-draw"><strong>draw</strong></a>(self, baseline)</dt></dl>
<dl><dt><a name="Expr-get_bbox"><strong>get_bbox</strong></a>(self)</dt></dl>
<dl><dt><a name="Expr-load_glyphs"><strong>load_glyphs</strong></a>(self)</dt></dl>
<dl><dt><a name="Expr-set_fontfile"><strong>set_fontfile</strong></a>(self, fontfile)</dt></dl>
<dl><dt><a name="Expr-set_next"><strong>set_next</strong></a>(self, nx, ny)</dt><dd><tt>Set the pen location where drawing should begin for the<br>
following <a href="#MathText">MathText</a></tt></dd></dl>
<dl><dt><a name="Expr-set_offsets"><strong>set_offsets</strong></a>(self, previous)</dt><dd><tt>Set the offsets assuming previous is the symbol before<br>
you. return a new previous</tt></dd></dl>
<dl><dt><a name="Expr-set_origin"><strong>set_origin</strong></a>(self, ox, oy)</dt><dd><tt>Set the pen location where drawing should begin</tt></dd></dl>
<dl><dt><a name="Expr-set_size"><strong>set_size</strong></a>(self, size)</dt></dl>
<hr>
Data and other attributes inherited from <a href="matplotlib.mathtext.html#MathText">MathText</a>:<br>
<dl><dt><strong>dpi</strong> = 200</dl>
<dl><dt><strong>fontfile</strong> = 'cmmi10.ttf'</dl>
<dl><dt><strong>nx</strong> = 0</dl>
<dl><dt><strong>ny</strong> = 0</dl>
<dl><dt><strong>ox</strong> = 0</dl>
<dl><dt><strong>oy</strong> = 0</dl>
<dl><dt><strong>size</strong> = 12</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="Font">class <strong>Font</strong></a>(<a href="matplotlib.mathtext.html#MathText">MathText</a>)</font></td></tr>
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Font-__init__"><strong>__init__</strong></a>(self, name, grp)</dt></dl>
<dl><dt><a name="Font-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
<dl><dt><a name="Font-get_children"><strong>get_children</strong></a>(self)</dt></dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>symmap</strong> = {r'\cal': 'cmsy10.ttf', r'\it': 'cmmi10.ttf', r'\rm': 'cmr10.ttf', r'\tt': 'cmtt10.ttf'}</dl>
<hr>
Methods inherited from <a href="matplotlib.mathtext.html#MathText">MathText</a>:<br>
<dl><dt><a name="Font-draw"><strong>draw</strong></a>(self, baseline)</dt></dl>
<dl><dt><a name="Font-get_bbox"><strong>get_bbox</strong></a>(self)</dt></dl>
<dl><dt><a name="Font-load_glyphs"><strong>load_glyphs</strong></a>(self)</dt></dl>
<dl><dt><a name="Font-set_fontfile"><strong>set_fontfile</strong></a>(self, fontfile)</dt></dl>
<dl><dt><a name="Font-set_next"><strong>set_next</strong></a>(self, nx, ny)</dt><dd><tt>Set the pen location where drawing should begin for the<br>
following <a href="#MathText">MathText</a></tt></dd></dl>
<dl><dt><a name="Font-set_offsets"><strong>set_offsets</strong></a>(self, previous)</dt><dd><tt>Set the offsets assuming previous is the symbol before<br>
you. return a new previous</tt></dd></dl>
<dl><dt><a name="Font-set_origin"><strong>set_origin</strong></a>(self, ox, oy)</dt><dd><tt>Set the pen location where drawing should begin</tt></dd></dl>
<dl><dt><a name="Font-set_size"><strong>set_size</strong></a>(self, size)</dt></dl>
<hr>
Data and other attributes inherited from <a href="matplotlib.mathtext.html#MathText">MathText</a>:<br>
<dl><dt><strong>dpi</strong> = 200</dl>
<dl><dt><strong>fontfile</strong> = 'cmmi10.ttf'</dl>
<dl><dt><strong>nx</strong> = 0</dl>
<dl><dt><strong>ny</strong> = 0</dl>
<dl><dt><strong>ox</strong> = 0</dl>
<dl><dt><strong>oy</strong> = 0</dl>
<dl><dt><strong>size</strong> = 12</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="Grp">class <strong>Grp</strong></a>(<a href="matplotlib.mathtext.html#MathText">MathText</a>)</font></td></tr>
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Grp-__init__"><strong>__init__</strong></a>(self, members)</dt></dl>
<dl><dt><a name="Grp-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
<dl><dt><a name="Grp-get_children"><strong>get_children</strong></a>(self)</dt></dl>
<hr>
Methods inherited from <a href="matplotlib.mathtext.html#MathText">MathText</a>:<br>
<dl><dt><a name="Grp-draw"><strong>draw</strong></a>(self, baseline)</dt></dl>
<dl><dt><a name="Grp-get_bbox"><strong>get_bbox</strong></a>(self)</dt></dl>
<dl><dt><a name="Grp-load_glyphs"><strong>load_glyphs</strong></a>(self)</dt></dl>
<dl><dt><a name="Grp-set_fontfile"><strong>set_fontfile</strong></a>(self, fontfile)</dt></dl>
<dl><dt><a name="Grp-set_next"><strong>set_next</strong></a>(self, nx, ny)</dt><dd><tt>Set the pen location where drawing should begin for the<br>
following <a href="#MathText">MathText</a></tt></dd></dl>
<dl><dt><a name="Grp-set_offsets"><strong>set_offsets</strong></a>(self, previous)</dt><dd><tt>Set the offsets assuming previous is the symbol before<br>
you. return a new previous</tt></dd></dl>
<dl><dt><a name="Grp-set_origin"><strong>set_origin</strong></a>(self, ox, oy)</dt><dd><tt>Set the pen location where drawing should begin</tt></dd></dl>
<dl><dt><a name="Grp-set_size"><strong>set_size</strong></a>(self, size)</dt></dl>
<hr>
Data and other attributes inherited from <a href="matplotlib.mathtext.html#MathText">MathText</a>:<br>
<dl><dt><strong>dpi</strong> = 200</dl>
<dl><dt><strong>fontfile</strong> = 'cmmi10.ttf'</dl>
<dl><dt><strong>nx</strong> = 0</dl>
<dl><dt><strong>ny</strong> = 0</dl>
<dl><dt><strong>ox</strong> = 0</dl>
<dl><dt><strong>oy</strong> = 0</dl>
<dl><dt><strong>size</strong> = 12</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="Handler">class <strong>Handler</strong></a></font></td></tr>
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Handler-expr"><strong>expr</strong></a>(self, s, loc, toks)</dt></dl>
<dl><dt><a name="Handler-fontgrp"><strong>fontgrp</strong></a>(self, s, loc, toks)</dt></dl>
<dl><dt><a name="Handler-grp"><strong>grp</strong></a>(self, s, loc, toks)</dt></dl>
<dl><dt><a name="Handler-singlesym"><strong>singlesym</strong></a>(self, s, loc, toks)</dt></dl>
<dl><dt><a name="Handler-subsupgrp"><strong>subsupgrp</strong></a>(self, s, loc, toks)</dt></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="MathText">class <strong>MathText</strong></a></font></td></tr>
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="MathText-draw"><strong>draw</strong></a>(self, baseline)</dt></dl>
<dl><dt><a name="MathText-get_bbox"><strong>get_bbox</strong></a>(self)</dt></dl>
<dl><dt><a name="MathText-get_children"><strong>get_children</strong></a>(self)</dt></dl>
<dl><dt><a name="MathText-load_glyphs"><strong>load_glyphs</strong></a>(self)</dt></dl>
<dl><dt><a name="MathText-set_fontfile"><strong>set_fontfile</strong></a>(self, fontfile)</dt></dl>
<dl><dt><a name="MathText-set_next"><strong>set_next</strong></a>(self, nx, ny)</dt><dd><tt>Set the pen location where drawing should begin for the<br>
following <a href="#MathText">MathText</a></tt></dd></dl>
<dl><dt><a name="MathText-set_offsets"><strong>set_offsets</strong></a>(self, previous)</dt><dd><tt>Set the offsets assuming previous is the symbol before<br>
you. return a new previous</tt></dd></dl>
<dl><dt><a name="MathText-set_origin"><strong>set_origin</strong></a>(self, ox, oy)</dt><dd><tt>Set the pen location where drawing should begin</tt></dd></dl>
<dl><dt><a name="MathText-set_size"><strong>set_size</strong></a>(self, size)</dt></dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>dpi</strong> = 200</dl>
<dl><dt><strong>fontfile</strong> = 'cmmi10.ttf'</dl>
<dl><dt><strong>nx</strong> = 0</dl>
<dl><dt><strong>ny</strong> = 0</dl>
<dl><dt><strong>ox</strong> = 0</dl>
<dl><dt><strong>oy</strong> = 0</dl>
<dl><dt><strong>size</strong> = 12</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="Single">class <strong>Single</strong></a>(<a href="matplotlib.mathtext.html#MathText">MathText</a>)</font></td></tr>
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Single-__init__"><strong>__init__</strong></a>(self, c)</dt></dl>
<dl><dt><a name="Single-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
<dl><dt><a name="Single-draw"><strong>draw</strong></a>(self, baseline)</dt></dl>
<dl><dt><a name="Single-get_alignment"><strong>get_alignment</strong></a>(self)</dt><dd><tt>return the descent below baseline</tt></dd></dl>
<dl><dt><a name="Single-get_bbox"><strong>get_bbox</strong></a>(self)</dt></dl>
<dl><dt><a name="Single-get_children"><strong>get_children</strong></a>(self)</dt></dl>
<dl><dt><a name="Single-load_glyphs"><strong>load_glyphs</strong></a>(self)</dt></dl>
<dl><dt><a name="Single-set_fontfile"><strong>set_fontfile</strong></a>(self, fontfile)</dt></dl>
<dl><dt><a name="Single-set_offsets"><strong>set_offsets</strong></a>(self, previous)</dt></dl>
<dl><dt><a name="Single-set_size"><strong>set_size</strong></a>(self, size)</dt></dl>
<hr>
Methods inherited from <a href="matplotlib.mathtext.html#MathText">MathText</a>:<br>
<dl><dt><a name="Single-set_next"><strong>set_next</strong></a>(self, nx, ny)</dt><dd><tt>Set the pen location where drawing should begin for the<br>
following <a href="#MathText">MathText</a></tt></dd></dl>
<dl><dt><a name="Single-set_origin"><strong>set_origin</strong></a>(self, ox, oy)</dt><dd><tt>Set the pen location where drawing should begin</tt></dd></dl>
<hr>
Data and other attributes inherited from <a href="matplotlib.mathtext.html#MathText">MathText</a>:<br>
<dl><dt><strong>dpi</strong> = 200</dl>
<dl><dt><strong>fontfile</strong> = 'cmmi10.ttf'</dl>
<dl><dt><strong>nx</strong> = 0</dl>
<dl><dt><strong>ny</strong> = 0</dl>
<dl><dt><strong>ox</strong> = 0</dl>
<dl><dt><strong>oy</strong> = 0</dl>
<dl><dt><strong>size</strong> = 12</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="SubSup">class <strong>SubSup</strong></a>(<a href="matplotlib.mathtext.html#MathText">MathText</a>)</font></td></tr>
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="SubSup-__init__"><strong>__init__</strong></a>(self, type, obj)</dt></dl>
<dl><dt><a name="SubSup-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
<dl><dt><a name="SubSup-get_children"><strong>get_children</strong></a>(self)</dt></dl>
<dl><dt><a name="SubSup-set_offsets"><strong>set_offsets</strong></a>(self, previous)</dt></dl>
<dl><dt><a name="SubSup-set_size"><strong>set_size</strong></a>(self, size)</dt></dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>SUBOFFSET</strong> = 0.5</dl>
<dl><dt><strong>SUBSCALE</strong> = 0.69999999999999996</dl>
<dl><dt><strong>SUPOFFSET</strong> = 0.75</dl>
<hr>
Methods inherited from <a href="matplotlib.mathtext.html#MathText">MathText</a>:<br>
<dl><dt><a name="SubSup-draw"><strong>draw</strong></a>(self, baseline)</dt></dl>
<dl><dt><a name="SubSup-get_bbox"><strong>get_bbox</strong></a>(self)</dt></dl>
<dl><dt><a name="SubSup-load_glyphs"><strong>load_glyphs</strong></a>(self)</dt></dl>
<dl><dt><a name="SubSup-set_fontfile"><strong>set_fontfile</strong></a>(self, fontfile)</dt></dl>
<dl><dt><a name="SubSup-set_next"><strong>set_next</strong></a>(self, nx, ny)</dt><dd><tt>Set the pen location where drawing should begin for the<br>
following <a href="#MathText">MathText</a></tt></dd></dl>
<dl><dt><a name="SubSup-set_origin"><strong>set_origin</strong></a>(self, ox, oy)</dt><dd><tt>Set the pen location where drawing should begin</tt></dd></dl>
<hr>
Data and other attributes inherited from <a href="matplotlib.mathtext.html#MathText">MathText</a>:<br>
<dl><dt><strong>dpi</strong> = 200</dl>
<dl><dt><strong>fontfile</strong> = 'cmmi10.ttf'</dl>
<dl><dt><strong>nx</strong> = 0</dl>
<dl><dt><strong>ny</strong> = 0</dl>
<dl><dt><strong>ox</strong> = 0</dl>
<dl><dt><strong>oy</strong> = 0</dl>
<dl><dt><strong>size</strong> = 12</dl>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
<td width="100%"><dl><dt><a name="-FT2Font"><strong>FT2Font</strong></a>(...)</dt><dd><tt><a href="#-FT2Font">FT2Font</a>(ttffile)<br>
<br>
Create a new FT2Font object<br>
The following global font attributes are defined:<br>
num_faces number of faces in file<br>
face_flags face flags (int type); see the ft2font constants<br>
style_flags style flags (int type); see the ft2font constants<br>
num_glyphs number of glyphs in the face<br>
family_name face family name<br>
style_name face syle name<br>
num_fixed_sizes number of bitmap in the face<br>
scalable face is scalable<br>
<br>
The following are available, if scalable is true:<br>
bbox face global bounding box (xmin, ymin, xmax, ymax)<br>
units_per_EM number of font units covered by the EM<br>
ascender ascender in 26.6 units<br>
descender descender in 26.6 units<br>
height height in 26.6 units; used to compute a default<br>
line spacing (baseline-to-baseline distance)<br>
max_advance_width maximum horizontal cursor advance for all glyphs<br>
max_advance_height same for vertical layout<br>
underline_position vertical position of the underline bar<br>
underline_thickness vertical thickness of the underline</tt></dd></dl>
<dl><dt><a name="-math_parse_s"><strong>math_parse_s</strong></a>(s, dpi, fontsize)</dt><dd><tt>Parse the math expression s, return the (bbox, fonts) tuple needed<br>
to render it.<br>
<br>
fontsize must be in points<br>
<br>
bbox: left, bottom, width, heigt<br>
fonts: a seq of FT2Fonts</tt></dd></dl>
</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
<td width="100%"><strong>False</strong> = False<br>
<strong>OFFSET_EX10</strong> = 4.0<br>
<strong>True</strong> = True<br>
<strong>absolute</strong> = <UFunc: 'abs'><br>
<strong>alphanums</strong> = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'<br>
<strong>alphas</strong> = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'<br>
<strong>ampersand</strong> = "&"<br>
<strong>at</strong> = "@"<br>
<strong>binop</strong> = MatchFirst:([MatchFirst:([MatchFirst:(["+", "-"]), "*"]), "/"])<br>
<strong>bslash</strong> = "\"<br>
<strong>cal</strong> = "cal"<br>
<strong>char</strong> = W:(abcd...)<br>
<strong>colon</strong> = ":"<br>
<strong>comma</strong> = ","<br>
<strong>div</strong> = "/"<br>
<strong>division</strong> = _Feature((2, 2, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 8192)<br>
<strong>equals</strong> = "="<br>
<strong>exclamation</strong> = "!"<br>
<strong>expr</strong> = OneOrMore:(Or:([Or:([Or:([Or:([Or:([Or:([Or:([Or...Optional:(Forward:(Group:(And:([...]))))])))])]))<br>
<strong>fontgrp</strong> = Group:(And:([Combine:(And:(["\", MatchFirst:([Ma...:(Group:(And:([...])))]))]), Suppress:("}")]))]))<br>
<strong>fontname</strong> = MatchFirst:([MatchFirst:([MatchFirst:(["rm", "cal"]), "it"]), "tt"])<br>
<strong>fonttable</strong> = {'(': ('cmr10.ttf', '28'), ')': ('cmr10.ttf', '29'), '*': ('cmsy10.ttf', 'A4'), '+': ('cmr10.ttf', '2B'), ',': ('cmmi10.ttf', '3B'), '-': ('cmsy10.ttf', 'A1'), '.': ('cmmi10.ttf', '3A'), '/': ('cmmi10.ttf', '3D'), '0': ('cmr10.ttf', '30'), '1': ('cmr10.ttf', '31'), ...}<br>
<strong>group</strong> = Or:([Or:([Group:(And:([And:([Suppress:("{"), One...), Optional:(Forward:(Group:(And:([...]))))])))])<br>
<strong>grouping</strong> = MatchFirst:([MatchFirst:([MatchFirst:(["[", "]"]), "("]), ")"])<br>
<strong>grp</strong> = Group:(And:([And:([Suppress:("{"), OneOrMore:(Or:([...]))]), Suppress:("}")]))<br>
<strong>handler</strong> = <matplotlib.mathtext.Handler instance><br>
<strong>italics</strong> = "it"<br>
<strong>langle</strong> = "<"<br>
<strong>lbrace</strong> = Suppress:("{")<br>
<strong>lbrack</strong> = "["<br>
<strong>lparen</strong> = "("<br>
<strong>minus</strong> = "-"<br>
<strong>misc</strong> = MatchFirst:([MatchFirst:([MatchFirst:(["!", "@"]), "%"]), "&"])<br>
<strong>nums</strong> = '0123456789'<br>
<strong>overunder</strong> = {r'\coprod': 1, r'\int': 1, r'\prod': 1, r'\sum': 1}<br>
<strong>percent</strong> = "%"<br>
<strong>period</strong> = "."<br>
<strong>plus</strong> = "+"<br>
<strong>punctuation</strong> = MatchFirst:([MatchFirst:([MatchFirst:([":", ","]), "."]), ";"])<br>
<strong>rangle</strong> = ">"<br>
<strong>rbrace</strong> = Suppress:("}")<br>
<strong>rbrack</strong> = "]"<br>
<strong>relation</strong> = MatchFirst:([MatchFirst:(["<", ">"]), "="])<br>
<strong>roman</strong> = "rm"<br>
<strong>rparen</strong> = ")"<br>
<strong>semicolon</strong> = ";"<br>
<strong>singlesym</strong> = Or:([Or:([Or:([Or:([Or:([Or:([Combine:(And:([And...chFirst:([MatchFirst:(["[", "]"]), "("]), ")"])])<br>
<strong>subsupgrp</strong> = Forward:(Group:(And:([And:([Or:(["_", "^"]), Or:...)]), Optional:(Forward:(Group:(And:([...]))))])))<br>
<strong>superscript</strong> = "^"<br>
<strong>symbol</strong> = Or:([Or:([Or:([Or:([Or:([Or:([Or:([Combine:(And:...), Optional:(Forward:(Group:(And:([...]))))])))])<br>
<strong>texsym</strong> = Combine:(And:([And:(["\", W:(abcd...)]), NotAny:(Suppress:("{"))]))<br>
<strong>times</strong> = "*"<br>
<strong>typewriter</strong> = "tt"<br>
<strong>underscore</strong> = "_"</td></tr></table>
</td>
</tr>
</table>
<br>
<table bgcolor=#eeefff align=right>
<tr><th align=center>Powered by</th></tr>
<tr><td align=center><a href=http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52305>YAPTU!</a></td></tr>
</table>
Matlab® is a registered trademark of The MathWorks
</body>
</html>