706 lines (547 with data), 43.1 kB
@header@
<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>
The spacing elements \ , \/ and \hspace{num} are provided. \/<br>
inserts a small space, and \hspace{num} inserts a fraction of the<br>
current fontsize. Eg, if num=0.5 and the fontsize is 12.0,<br>
hspace{0.5} inserts 6 points of space<br>
<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>
and the file BaKoMa-CM.<a href="#Fonts">Fonts</a> in the matplotlib fonts dir.<br>
<br>
Note that all the code in this module is distributed under the<br>
matplotlib license, and a truly free implementation of mathtext for<br>
either freetype or ps would simply require deriving another concrete<br>
implementation from the <a href="#Fonts">Fonts</a> class defined in this module which<br>
used free fonts.<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 \angstrom \ast \asymp<br>
\backslash \beta \bigcap \bigcirc \bigcup \bigodot \bigoplus<br>
\bigotimes \bigtriangledown \bigtriangleup \biguplus \bigvee<br>
\bigwedge \bot \bullet \cap \cdot \chi \circ \clubsuit \coprod \cup<br>
\dag \dashv \ddag \delta \diamond \diamondsuit \div \downarrow \ell<br>
\emptyset \epsilon \equiv \eta \exists \flat \forall \frown \gamma<br>
\geq \gg \heartsuit \hspace \imath \in \infty \int \iota \jmath<br>
\kappa \lambda \langle \lbrace \lceil \leftangle \leftarrow<br>
\leftbrace \leftbracket \leftharpoondown \leftharpoonup \leftparen<br>
\leftrightarrow \leq \lfloor \ll \mid \mp \mu \nabla \natural<br>
\nearrow \neg \ni \nu \nwarrow \odot \oint \omega \ominus \oplus<br>
\oslash \otimes \phi \pi \pm \prec \preceq \prime \prod \propto \psi<br>
\rangle \rbrace \rceil \rfloor \rho \rightangle \rightarrow<br>
\rightbrace \rightbracket \rightharpoondown \rightharpoonup<br>
\rightparen \searrow \sharp \sigma \sim \simeq \slash \smile<br>
\spadesuit \sqcap \sqcup \sqrt \sqsubseteq \sqsupseteq \subset<br>
\subseteq \succ \succeq \sum \supset \supseteq \swarrow \tau \theta<br>
\times \top \triangleleft \triangleright \uparrow \updownarrow<br>
\uplus \upsilon \varepsilon \varphi \varphi \varrho \varsigma<br>
\vartheta \vdash \vee \wedge \wp \wr \xi \zeta<br>
<br>
<br>
BACKENDS<br>
<br>
mathtext currently works with GTK, Agg, GTKAgg, TkAgg and WxAgg and<br>
PS, though only horizontal and vertical rotations are supported. 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>
mathtext now embeds the TrueType computer modern fonts into the PS<br>
file, so what you see on the screen should be what you get on paper.<br>
<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>
- FIXED in 0.54 - some hackish ways I deal with a strange offset in cmex10<br>
- nested subscripts, eg, x_i_j not working; but you can do x_{i_j}<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#DummyFonts">DummyFonts</a>
</font></dt><dt><font face="helvetica, arial"><a href="matplotlib.mathtext.html#Element">Element</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="matplotlib.mathtext.html#GroupElement">GroupElement</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="matplotlib.mathtext.html#ExpressionElement">ExpressionElement</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="matplotlib.mathtext.html#SpaceElement">SpaceElement</a>
</font></dt><dt><font face="helvetica, arial"><a href="matplotlib.mathtext.html#SymbolElement">SymbolElement</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="matplotlib.mathtext.html#Fonts">Fonts</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="matplotlib.mathtext.html#BakomaPSFonts">BakomaPSFonts</a>
</font></dt><dt><font face="helvetica, arial"><a href="matplotlib.mathtext.html#BakomaTrueTypeFonts">BakomaTrueTypeFonts</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="matplotlib.mathtext.html#Handler">Handler</a>
</font></dt></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="BakomaPSFonts">class <strong>BakomaPSFonts</strong></a>(<a href="matplotlib.mathtext.html#Fonts">Fonts</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>Use the Bakoma postscript fonts for rendering to backend_ps<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="BakomaPSFonts-__init__"><strong>__init__</strong></a>(self)</dt></dl>
<dl><dt><a name="BakomaPSFonts-get_metrics"><strong>get_metrics</strong></a>(self, font, sym, fontsize, dpi)</dt></dl>
<dl><dt><a name="BakomaPSFonts-render"><strong>render</strong></a>(self, ox, oy, font, sym, fontsize, dpi)</dt></dl>
<dl><dt><a name="BakomaPSFonts-set_canvas_size"><strong>set_canvas_size</strong></a>(self, w, h, pswriter)</dt><dd><tt>Dimension the drawing canvas; may be a noop</tt></dd></dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>basepath</strong> = '/usr/local/share/matplotlib'</dl>
<dl><dt><strong>fnames</strong> = ('cmmi10', 'cmsy10', 'cmex10', 'cmtt10', 'cmr10')</dl>
<dl><dt><strong>fontmap</strong> = {None: 'cmmi10', 'cal': 'cmsy10', 'it': 'cmmi10', 'rm': 'cmr10', 'tt': 'cmtt10'}</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="BakomaTrueTypeFonts">class <strong>BakomaTrueTypeFonts</strong></a>(<a href="matplotlib.mathtext.html#Fonts">Fonts</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>Use the Bakoma true type fonts for rendering<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="BakomaTrueTypeFonts-__init__"><strong>__init__</strong></a>(self, useSVG<font color="#909090">=False</font>)</dt></dl>
<dl><dt><a name="BakomaTrueTypeFonts-get_metrics"><strong>get_metrics</strong></a>(self, font, sym, fontsize, dpi)</dt></dl>
<dl><dt><a name="BakomaTrueTypeFonts-render"><strong>render</strong></a>(self, ox, oy, font, sym, fontsize, dpi)</dt></dl>
<dl><dt><a name="BakomaTrueTypeFonts-set_canvas_size"><strong>set_canvas_size</strong></a>(self, w, h)</dt><dd><tt>Dimension the drawing canvas; may be a noop</tt></dd></dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>basepath</strong> = '/usr/local/share/matplotlib'</dl>
<dl><dt><strong>fnames</strong> = ('cmmi10', 'cmsy10', 'cmex10', 'cmtt10', 'cmr10')</dl>
<dl><dt><strong>fontmap</strong> = {None: 'cmmi10', 'cal': 'cmsy10', 'it': 'cmmi10', 'rm': 'cmr10', 'tt': 'cmtt10'}</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="DummyFonts">class <strong>DummyFonts</strong></a></font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>dummy class for debugging parser<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="DummyFonts-get_metrics"><strong>get_metrics</strong></a>(self, font, sym, fontsize, dpi)</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="Element">class <strong>Element</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="Element-__init__"><strong>__init__</strong></a>(self)</dt></dl>
<dl><dt><a name="Element-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
<dl><dt><a name="Element-advance"><strong>advance</strong></a>(self)</dt><dd><tt>get the horiz advance</tt></dd></dl>
<dl><dt><a name="Element-centerx"><strong>centerx</strong></a>(self)</dt></dl>
<dl><dt><a name="Element-centery"><strong>centery</strong></a>(self)</dt></dl>
<dl><dt><a name="Element-height"><strong>height</strong></a>(self)</dt><dd><tt>get the element height: ymax-ymin</tt></dd></dl>
<dl><dt><a name="Element-padx"><strong>padx</strong></a>(self)</dt></dl>
<dl><dt><a name="Element-pady"><strong>pady</strong></a>(self)</dt></dl>
<dl><dt><a name="Element-render"><strong>render</strong></a>(self)</dt><dd><tt>render to the fonts canvas</tt></dd></dl>
<dl><dt><a name="Element-set_font"><strong>set_font</strong></a>(self, font)</dt><dd><tt>set the font (one of tt, it, rm , cal)</tt></dd></dl>
<dl><dt><a name="Element-set_origin"><strong>set_origin</strong></a>(self, ox, oy)</dt></dl>
<dl><dt><a name="Element-set_padx"><strong>set_padx</strong></a>(self, pad)</dt><dd><tt>set the y padding in points</tt></dd></dl>
<dl><dt><a name="Element-set_pady"><strong>set_pady</strong></a>(self, pad)</dt><dd><tt>set the y padding in points</tt></dd></dl>
<dl><dt><a name="Element-set_scale"><strong>set_scale</strong></a>(self, scale)</dt><dd><tt>scale the element by scale</tt></dd></dl>
<dl><dt><a name="Element-set_size_info"><strong>set_size_info</strong></a>(self, fontsize, dpi)</dt></dl>
<dl><dt><a name="Element-width"><strong>width</strong></a>(self)</dt><dd><tt>get the element width: xmax-xmin</tt></dd></dl>
<dl><dt><a name="Element-xmax"><strong>xmax</strong></a>(self)</dt><dd><tt>get the xmax of ink rect</tt></dd></dl>
<dl><dt><a name="Element-xmin"><strong>xmin</strong></a>(self)</dt><dd><tt>get the xmin of ink rect</tt></dd></dl>
<dl><dt><a name="Element-ymax"><strong>ymax</strong></a>(self)</dt><dd><tt>get the ymax of ink rect</tt></dd></dl>
<dl><dt><a name="Element-ymin"><strong>ymin</strong></a>(self)</dt><dd><tt>get the ymin of ink rect</tt></dd></dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>dpi</strong> = 72</dl>
<dl><dt><strong>font</strong> = 'it'</dl>
<dl><dt><strong>fontsize</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="ExpressionElement">class <strong>ExpressionElement</strong></a>(<a href="matplotlib.mathtext.html#GroupElement">GroupElement</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>The entire mathtext expression<br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="matplotlib.mathtext.html#ExpressionElement">ExpressionElement</a></dd>
<dd><a href="matplotlib.mathtext.html#GroupElement">GroupElement</a></dd>
<dd><a href="matplotlib.mathtext.html#Element">Element</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="ExpressionElement-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
<hr>
Methods inherited from <a href="matplotlib.mathtext.html#GroupElement">GroupElement</a>:<br>
<dl><dt><a name="ExpressionElement-__init__"><strong>__init__</strong></a>(self, elements)</dt></dl>
<dl><dt><a name="ExpressionElement-advance"><strong>advance</strong></a>(self)</dt><dd><tt>get the horiz advance</tt></dd></dl>
<dl><dt><a name="ExpressionElement-height"><strong>height</strong></a>(self)</dt><dd><tt>get the element height: ymax-ymin</tt></dd></dl>
<dl><dt><a name="ExpressionElement-render"><strong>render</strong></a>(self)</dt><dd><tt>render to the fonts canvas</tt></dd></dl>
<dl><dt><a name="ExpressionElement-set_font"><strong>set_font</strong></a>(self, font)</dt><dd><tt>set the font (one of tt, it, rm , cal)</tt></dd></dl>
<dl><dt><a name="ExpressionElement-set_origin"><strong>set_origin</strong></a>(self, ox, oy)</dt></dl>
<dl><dt><a name="ExpressionElement-set_size_info"><strong>set_size_info</strong></a>(self, fontsize, dpi)</dt></dl>
<dl><dt><a name="ExpressionElement-width"><strong>width</strong></a>(self)</dt><dd><tt>get the element width: xmax-xmin</tt></dd></dl>
<dl><dt><a name="ExpressionElement-xmax"><strong>xmax</strong></a>(self)</dt><dd><tt>get the max ink in x</tt></dd></dl>
<dl><dt><a name="ExpressionElement-xmin"><strong>xmin</strong></a>(self)</dt><dd><tt>get the minimum ink in x</tt></dd></dl>
<dl><dt><a name="ExpressionElement-ymax"><strong>ymax</strong></a>(self)</dt><dd><tt>get the max ink in y</tt></dd></dl>
<dl><dt><a name="ExpressionElement-ymin"><strong>ymin</strong></a>(self)</dt><dd><tt>get the minimum ink in y</tt></dd></dl>
<hr>
Methods inherited from <a href="matplotlib.mathtext.html#Element">Element</a>:<br>
<dl><dt><a name="ExpressionElement-centerx"><strong>centerx</strong></a>(self)</dt></dl>
<dl><dt><a name="ExpressionElement-centery"><strong>centery</strong></a>(self)</dt></dl>
<dl><dt><a name="ExpressionElement-padx"><strong>padx</strong></a>(self)</dt></dl>
<dl><dt><a name="ExpressionElement-pady"><strong>pady</strong></a>(self)</dt></dl>
<dl><dt><a name="ExpressionElement-set_padx"><strong>set_padx</strong></a>(self, pad)</dt><dd><tt>set the y padding in points</tt></dd></dl>
<dl><dt><a name="ExpressionElement-set_pady"><strong>set_pady</strong></a>(self, pad)</dt><dd><tt>set the y padding in points</tt></dd></dl>
<dl><dt><a name="ExpressionElement-set_scale"><strong>set_scale</strong></a>(self, scale)</dt><dd><tt>scale the element by scale</tt></dd></dl>
<hr>
Data and other attributes inherited from <a href="matplotlib.mathtext.html#Element">Element</a>:<br>
<dl><dt><strong>dpi</strong> = 72</dl>
<dl><dt><strong>font</strong> = 'it'</dl>
<dl><dt><strong>fontsize</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="Fonts">class <strong>Fonts</strong></a></font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>An abstract base class for fonts that want to render mathtext<br>
<br>
The class must be able to take symbol keys and font file names and<br>
return the character metrics as well as do the drawing<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Fonts-get_metrics"><strong>get_metrics</strong></a>(self, font, sym, fontsize, dpi)</dt><dd><tt>font is one of tt, it, rm, cal or None<br>
<br>
sym is a single symbol(alphanum, punct) or a special symbol<br>
like \sigma.<br>
<br>
fontsize is in points<br>
<br>
Return object has attributes - see<br>
<a href="http://www.freetype.org/freetype2/docs/tutorial/step2.html">http://www.freetype.org/freetype2/docs/tutorial/step2.html</a> for<br>
a pictoral representation of these attributes<br>
<br>
advance<br>
height<br>
width<br>
xmin, xmax, ymin, ymax - the ink rectangle of the glyph</tt></dd></dl>
<dl><dt><a name="Fonts-render"><strong>render</strong></a>(self, ox, oy, font, sym, fontsize, dpi)</dt></dl>
<dl><dt><a name="Fonts-set_canvas_size"><strong>set_canvas_size</strong></a>(self, w, h)</dt><dd><tt>Dimension the drawing canvas; may be a noop</tt></dd></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="GroupElement">class <strong>GroupElement</strong></a>(<a href="matplotlib.mathtext.html#Element">Element</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>A group is a collection of elements<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="GroupElement-__init__"><strong>__init__</strong></a>(self, elements)</dt></dl>
<dl><dt><a name="GroupElement-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
<dl><dt><a name="GroupElement-advance"><strong>advance</strong></a>(self)</dt><dd><tt>get the horiz advance</tt></dd></dl>
<dl><dt><a name="GroupElement-height"><strong>height</strong></a>(self)</dt><dd><tt>get the element height: ymax-ymin</tt></dd></dl>
<dl><dt><a name="GroupElement-render"><strong>render</strong></a>(self)</dt><dd><tt>render to the fonts canvas</tt></dd></dl>
<dl><dt><a name="GroupElement-set_font"><strong>set_font</strong></a>(self, font)</dt><dd><tt>set the font (one of tt, it, rm , cal)</tt></dd></dl>
<dl><dt><a name="GroupElement-set_origin"><strong>set_origin</strong></a>(self, ox, oy)</dt></dl>
<dl><dt><a name="GroupElement-set_size_info"><strong>set_size_info</strong></a>(self, fontsize, dpi)</dt></dl>
<dl><dt><a name="GroupElement-width"><strong>width</strong></a>(self)</dt><dd><tt>get the element width: xmax-xmin</tt></dd></dl>
<dl><dt><a name="GroupElement-xmax"><strong>xmax</strong></a>(self)</dt><dd><tt>get the max ink in x</tt></dd></dl>
<dl><dt><a name="GroupElement-xmin"><strong>xmin</strong></a>(self)</dt><dd><tt>get the minimum ink in x</tt></dd></dl>
<dl><dt><a name="GroupElement-ymax"><strong>ymax</strong></a>(self)</dt><dd><tt>get the max ink in y</tt></dd></dl>
<dl><dt><a name="GroupElement-ymin"><strong>ymin</strong></a>(self)</dt><dd><tt>get the minimum ink in y</tt></dd></dl>
<hr>
Methods inherited from <a href="matplotlib.mathtext.html#Element">Element</a>:<br>
<dl><dt><a name="GroupElement-centerx"><strong>centerx</strong></a>(self)</dt></dl>
<dl><dt><a name="GroupElement-centery"><strong>centery</strong></a>(self)</dt></dl>
<dl><dt><a name="GroupElement-padx"><strong>padx</strong></a>(self)</dt></dl>
<dl><dt><a name="GroupElement-pady"><strong>pady</strong></a>(self)</dt></dl>
<dl><dt><a name="GroupElement-set_padx"><strong>set_padx</strong></a>(self, pad)</dt><dd><tt>set the y padding in points</tt></dd></dl>
<dl><dt><a name="GroupElement-set_pady"><strong>set_pady</strong></a>(self, pad)</dt><dd><tt>set the y padding in points</tt></dd></dl>
<dl><dt><a name="GroupElement-set_scale"><strong>set_scale</strong></a>(self, scale)</dt><dd><tt>scale the element by scale</tt></dd></dl>
<hr>
Data and other attributes inherited from <a href="matplotlib.mathtext.html#Element">Element</a>:<br>
<dl><dt><strong>dpi</strong> = 72</dl>
<dl><dt><strong>font</strong> = 'it'</dl>
<dl><dt><strong>fontsize</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-clear"><strong>clear</strong></a>(self)</dt></dl>
<dl><dt><a name="Handler-composite"><strong>composite</strong></a>(self, s, loc, toks)</dt></dl>
<dl><dt><a name="Handler-expression"><strong>expression</strong></a>(self, s, loc, toks)</dt></dl>
<dl><dt><a name="Handler-font"><strong>font</strong></a>(self, s, loc, toks)</dt></dl>
<dl><dt><a name="Handler-group"><strong>group</strong></a>(self, s, loc, toks)</dt></dl>
<dl><dt><a name="Handler-is_overunder"><strong>is_overunder</strong></a>(self, prev)</dt></dl>
<dl><dt><a name="Handler-space"><strong>space</strong></a>(self, s, loc, toks)</dt></dl>
<dl><dt><a name="Handler-subscript"><strong>subscript</strong></a>(self, s, loc, toks)</dt></dl>
<dl><dt><a name="Handler-subsuperscript"><strong>subsuperscript</strong></a>(self, s, loc, toks)</dt></dl>
<dl><dt><a name="Handler-superscript"><strong>superscript</strong></a>(self, s, loc, toks)</dt></dl>
<dl><dt><a name="Handler-symbol"><strong>symbol</strong></a>(self, s, loc, toks)</dt></dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>symbols</strong> = []</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="SpaceElement">class <strong>SpaceElement</strong></a>(<a href="matplotlib.mathtext.html#Element">Element</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>blank horizontal space<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="SpaceElement-__init__"><strong>__init__</strong></a>(self, space)</dt><dd><tt>space is the amount of blank space in fraction of fontsize</tt></dd></dl>
<dl><dt><a name="SpaceElement-advance"><strong>advance</strong></a>(self)</dt><dd><tt>get the horiz advance</tt></dd></dl>
<dl><dt><a name="SpaceElement-height"><strong>height</strong></a>(self)</dt><dd><tt>get the element height: ymax-ymin</tt></dd></dl>
<dl><dt><a name="SpaceElement-set_font"><strong>set_font</strong></a>(self, f)</dt></dl>
<dl><dt><a name="SpaceElement-width"><strong>width</strong></a>(self)</dt><dd><tt>get the element width: xmax-xmin</tt></dd></dl>
<dl><dt><a name="SpaceElement-xmax"><strong>xmax</strong></a>(self)</dt><dd><tt>get the max ink in x</tt></dd></dl>
<dl><dt><a name="SpaceElement-xmin"><strong>xmin</strong></a>(self)</dt><dd><tt>get the minimum ink in x</tt></dd></dl>
<dl><dt><a name="SpaceElement-ymax"><strong>ymax</strong></a>(self)</dt><dd><tt>get the max ink in y</tt></dd></dl>
<dl><dt><a name="SpaceElement-ymin"><strong>ymin</strong></a>(self)</dt><dd><tt>get the minimum ink in y</tt></dd></dl>
<hr>
Methods inherited from <a href="matplotlib.mathtext.html#Element">Element</a>:<br>
<dl><dt><a name="SpaceElement-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
<dl><dt><a name="SpaceElement-centerx"><strong>centerx</strong></a>(self)</dt></dl>
<dl><dt><a name="SpaceElement-centery"><strong>centery</strong></a>(self)</dt></dl>
<dl><dt><a name="SpaceElement-padx"><strong>padx</strong></a>(self)</dt></dl>
<dl><dt><a name="SpaceElement-pady"><strong>pady</strong></a>(self)</dt></dl>
<dl><dt><a name="SpaceElement-render"><strong>render</strong></a>(self)</dt><dd><tt>render to the fonts canvas</tt></dd></dl>
<dl><dt><a name="SpaceElement-set_origin"><strong>set_origin</strong></a>(self, ox, oy)</dt></dl>
<dl><dt><a name="SpaceElement-set_padx"><strong>set_padx</strong></a>(self, pad)</dt><dd><tt>set the y padding in points</tt></dd></dl>
<dl><dt><a name="SpaceElement-set_pady"><strong>set_pady</strong></a>(self, pad)</dt><dd><tt>set the y padding in points</tt></dd></dl>
<dl><dt><a name="SpaceElement-set_scale"><strong>set_scale</strong></a>(self, scale)</dt><dd><tt>scale the element by scale</tt></dd></dl>
<dl><dt><a name="SpaceElement-set_size_info"><strong>set_size_info</strong></a>(self, fontsize, dpi)</dt></dl>
<hr>
Data and other attributes inherited from <a href="matplotlib.mathtext.html#Element">Element</a>:<br>
<dl><dt><strong>dpi</strong> = 72</dl>
<dl><dt><strong>font</strong> = 'it'</dl>
<dl><dt><strong>fontsize</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="SymbolElement">class <strong>SymbolElement</strong></a>(<a href="matplotlib.mathtext.html#Element">Element</a>)</font></td></tr>
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="SymbolElement-__init__"><strong>__init__</strong></a>(self, sym)</dt></dl>
<dl><dt><a name="SymbolElement-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
<dl><dt><a name="SymbolElement-advance"><strong>advance</strong></a>(self)</dt><dd><tt>get the horiz advance</tt></dd></dl>
<dl><dt><a name="SymbolElement-height"><strong>height</strong></a>(self)</dt><dd><tt>get the element height: ymax-ymin</tt></dd></dl>
<dl><dt><a name="SymbolElement-render"><strong>render</strong></a>(self)</dt><dd><tt>render to the fonts canvas</tt></dd></dl>
<dl><dt><a name="SymbolElement-set_font"><strong>set_font</strong></a>(self, font)</dt><dd><tt>set the font (one of tt, it, rm , cal)</tt></dd></dl>
<dl><dt><a name="SymbolElement-set_origin"><strong>set_origin</strong></a>(self, ox, oy)</dt></dl>
<dl><dt><a name="SymbolElement-set_size_info"><strong>set_size_info</strong></a>(self, fontsize, dpi)</dt></dl>
<dl><dt><a name="SymbolElement-width"><strong>width</strong></a>(self)</dt><dd><tt>get the element width: xmax-xmin</tt></dd></dl>
<dl><dt><a name="SymbolElement-xmax"><strong>xmax</strong></a>(self)</dt><dd><tt>get the max ink in x</tt></dd></dl>
<dl><dt><a name="SymbolElement-xmin"><strong>xmin</strong></a>(self)</dt><dd><tt>get the minimum ink in x</tt></dd></dl>
<dl><dt><a name="SymbolElement-ymax"><strong>ymax</strong></a>(self)</dt><dd><tt>get the max ink in y</tt></dd></dl>
<dl><dt><a name="SymbolElement-ymin"><strong>ymin</strong></a>(self)</dt><dd><tt>get the minimum ink in y</tt></dd></dl>
<hr>
Methods inherited from <a href="matplotlib.mathtext.html#Element">Element</a>:<br>
<dl><dt><a name="SymbolElement-centerx"><strong>centerx</strong></a>(self)</dt></dl>
<dl><dt><a name="SymbolElement-centery"><strong>centery</strong></a>(self)</dt></dl>
<dl><dt><a name="SymbolElement-padx"><strong>padx</strong></a>(self)</dt></dl>
<dl><dt><a name="SymbolElement-pady"><strong>pady</strong></a>(self)</dt></dl>
<dl><dt><a name="SymbolElement-set_padx"><strong>set_padx</strong></a>(self, pad)</dt><dd><tt>set the y padding in points</tt></dd></dl>
<dl><dt><a name="SymbolElement-set_pady"><strong>set_pady</strong></a>(self, pad)</dt><dd><tt>set the y padding in points</tt></dd></dl>
<dl><dt><a name="SymbolElement-set_scale"><strong>set_scale</strong></a>(self, scale)</dt><dd><tt>scale the element by scale</tt></dd></dl>
<hr>
Data and other attributes inherited from <a href="matplotlib.mathtext.html#Element">Element</a>:<br>
<dl><dt><strong>dpi</strong> = 72</dl>
<dl><dt><strong>font</strong> = 'it'</dl>
<dl><dt><strong>fontsize</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>FT2Font</tt></dd></dl>
<dl><dt><a name="-StringIO"><strong>StringIO</strong></a>(...)</dt><dd><tt><a href="#-StringIO">StringIO</a>([s]) -- Return a StringIO-like stream for reading or writing</tt></dd></dl>
<dl><dt><a name="-math_parse_s_ft2font"><strong>math_parse_s_ft2font</strong></a>(s, dpi, fontsize, angle<font color="#909090">=0</font>)</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>
return is width, height, fonts</tt></dd></dl>
<dl><dt><a name="-math_parse_s_ft2font_svg"><strong>math_parse_s_ft2font_svg</strong></a>(s, dpi, fontsize, angle<font color="#909090">=0</font>)</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>
return is width, height, fonts</tt></dd></dl>
<dl><dt><a name="-math_parse_s_ps"><strong>math_parse_s_ps</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>
return is width, height, fonts</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>True</strong> = True<br>
<strong>absolute</strong> = <ufunc 'absolute'><br>
<strong>alphanums</strong> = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'<br>
<strong>alphas</strong> = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'<br>
<strong>ampersand</strong> = "&"<br>
<strong>at</strong> = "@"<br>
<strong>bakoma_fonts</strong> = []<br>
<strong>binop</strong> = {{{"+" | "-"} | "*"} | "/"}<br>
<strong>bslash</strong> = "\"<br>
<strong>cal</strong> = "cal"<br>
<strong>char</strong> = W:(abcd...)<br>
<strong>charOverChars</strong> = {r'\angstrom': (('rm', 'A', 1.0), (None, r'\circ', 0.5), 0.0)}<br>
<strong>colon</strong> = ":"<br>
<strong>comma</strong> = ","<br>
<strong>composite</strong> = composite<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>expression</strong> = expression<br>
<strong>font</strong> = font<br>
<strong>fontname</strong> = {{{"rm" | "cal"} | "it"} | "tt"}<br>
<strong>group</strong> = group<br>
<strong>grouping</strong> = {{{"[" | "]"} | "("} | ")"}<br>
<strong>handler</strong> = <matplotlib.mathtext.Handler instance><br>
<strong>italics</strong> = "it"<br>
<strong>langle</strong> = "<"<br>
<strong>latex_to_bakoma</strong> = {'(': ('cmr10', 119), ')': ('cmr10', 68), '*': ('cmsy10', 9), '+': ('cmr10', 76), ',': ('cmmi10', 44), '-': ('cmsy10', 17), '.': ('cmmi10', 51), '/': ('cmmi10', 98), '0': ('cmr10', 40), '1': ('cmr10', 100), ...}<br>
<strong>lbrace</strong> = Suppress:("{")<br>
<strong>lbrack</strong> = "["<br>
<strong>lparen</strong> = "("<br>
<strong>minus</strong> = "-"<br>
<strong>misc</strong> = {{{"!" | "@"} | "%"} | "&"}<br>
<strong>number</strong> = Combine:({{W:(0123...) ["."]} [W:(0123...)]})<br>
<strong>nums</strong> = '0123456789'<br>
<strong>over</strong> = "over"<br>
<strong>overUnder</strong> = {"over" | "under"}<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> = {{{":" | ","} | "."} | ";"}<br>
<strong>rangle</strong> = ">"<br>
<strong>rbrace</strong> = Suppress:("}")<br>
<strong>rbrack</strong> = "]"<br>
<strong>relation</strong> = {{"<" | ">"} | "="}<br>
<strong>roman</strong> = "rm"<br>
<strong>rparen</strong> = ")"<br>
<strong>semicolon</strong> = ";"<br>
<strong>space</strong> = space<br>
<strong>subscript</strong> = subscript<br>
<strong>subsuperscript</strong> = subsuperscript<br>
<strong>superscript</strong> = superscript<br>
<strong>symbol</strong> = {{{{{{Combine:({{"\" W:(abcd...)} ~{Suppress:("{...@"} | "%"} | "&"}} | {{{"[" | "]"} | "("} | ")"}}<br>
<strong>symgroup</strong> = {{{{{{{Combine:({{"\" W:(abcd...)} ~{Suppress:("...} | "&"}} | {{{"[" | "]"} | "("} | ")"}} | group}<br>
<strong>texsym</strong> = Combine:({{"\" W:(abcd...)} ~{Suppress:("{")}})<br>
<strong>times</strong> = "*"<br>
<strong>typewriter</strong> = "tt"<br>
<strong>under</strong> = "under"<br>
<strong>verbose</strong> = <matplotlib.Verbose instance></td></tr></table>
@footer@