294 lines (215 with data), 20.3 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>.text</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/text.py">/usr/local/lib/python2.3/site-packages/matplotlib/text.py</a></font></td></tr></table>
<p><tt>Figure and Axes text</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="math.html">math</a><br>
</td><td width="25%" valign=top><a href="matplotlib.html">matplotlib</a><br>
</td><td width="25%" valign=top><a href="re.html">re</a><br>
</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.artist.html#Artist">matplotlib.artist.Artist</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="matplotlib.text.html#Text">Text</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="Text">class <strong>Text</strong></a>(<a href="matplotlib.artist.html#Artist">matplotlib.artist.Artist</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>Handle storing and drawing of text in window or data coordinates<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Text-__init__"><strong>__init__</strong></a>(self, x<font color="#909090">=0</font>, y<font color="#909090">=0</font>, text<font color="#909090">=''</font>, color<font color="#909090">=None</font>, verticalalignment<font color="#909090">='bottom'</font>, horizontalalignment<font color="#909090">='left'</font>, multialignment<font color="#909090">=None</font>, fontproperties<font color="#909090">=None</font>, rotation<font color="#909090">=None</font>)</dt></dl>
<dl><dt><a name="Text-draw"><strong>draw</strong></a>(self, renderer)</dt></dl>
<dl><dt><a name="Text-get_color"><strong>get_color</strong></a>(self)</dt><dd><tt>Return the color of the text</tt></dd></dl>
<dl><dt><a name="Text-get_font_properties"><strong>get_font_properties</strong></a>(self)</dt><dd><tt>Return the font object</tt></dd></dl>
<dl><dt><a name="Text-get_fontname"><strong>get_fontname</strong></a>(self)</dt><dd><tt>alias for get_name</tt></dd></dl>
<dl><dt><a name="Text-get_fontsize"><strong>get_fontsize</strong></a>(self)</dt><dd><tt>alias for get_size</tt></dd></dl>
<dl><dt><a name="Text-get_fontstyle"><strong>get_fontstyle</strong></a>(self)</dt><dd><tt>alias for get_style</tt></dd></dl>
<dl><dt><a name="Text-get_fontweight"><strong>get_fontweight</strong></a>(self)</dt><dd><tt>alias for get_weight</tt></dd></dl>
<dl><dt><a name="Text-get_ha"><strong>get_ha</strong></a>(self)</dt><dd><tt>alias for get_horizontalalignment</tt></dd></dl>
<dl><dt><a name="Text-get_horizontalalignment"><strong>get_horizontalalignment</strong></a>(self)</dt><dd><tt>Return the horizontal alignment as string</tt></dd></dl>
<dl><dt><a name="Text-get_name"><strong>get_name</strong></a>(self)</dt><dd><tt>Return the font name as string</tt></dd></dl>
<dl><dt><a name="Text-get_position"><strong>get_position</strong></a>(self)</dt><dd><tt>Return x, y as tuple</tt></dd></dl>
<dl><dt><a name="Text-get_prop_tup"><strong>get_prop_tup</strong></a>(self)</dt><dd><tt>Return a hashable tuple of properties<br>
<br>
Not intended to be human readable, but useful for backends who<br>
want to cache derived information about text (eg layouts) and<br>
need to know if the text has changed</tt></dd></dl>
<dl><dt><a name="Text-get_rotation"><strong>get_rotation</strong></a>(self)</dt><dd><tt>return the text angle as float</tt></dd></dl>
<dl><dt><a name="Text-get_rotation_matrix"><strong>get_rotation_matrix</strong></a>(self, x0, y0)</dt></dl>
<dl><dt><a name="Text-get_size"><strong>get_size</strong></a>(self)</dt><dd><tt>Return the font size as integer</tt></dd></dl>
<dl><dt><a name="Text-get_style"><strong>get_style</strong></a>(self)</dt><dd><tt>Return the font style as string</tt></dd></dl>
<dl><dt><a name="Text-get_text"><strong>get_text</strong></a>(self)</dt><dd><tt>Get the text as string</tt></dd></dl>
<dl><dt><a name="Text-get_va"><strong>get_va</strong></a>(self)</dt><dd><tt>alias for getverticalalignment</tt></dd></dl>
<dl><dt><a name="Text-get_verticalalignment"><strong>get_verticalalignment</strong></a>(self)</dt><dd><tt>Return the vertical alignment as string</tt></dd></dl>
<dl><dt><a name="Text-get_weight"><strong>get_weight</strong></a>(self)</dt><dd><tt>Get the font weight as string</tt></dd></dl>
<dl><dt><a name="Text-get_window_extent"><strong>get_window_extent</strong></a>(self, renderer<font color="#909090">=None</font>)</dt></dl>
<dl><dt><a name="Text-is_math_text"><strong>is_math_text</strong></a>(self)</dt></dl>
<dl><dt><a name="Text-set_backgroundcolor"><strong>set_backgroundcolor</strong></a>(self, color)</dt><dd><tt>Set the background color of the text<br>
<br>
ACCEPTS: any matplotlib color - see help(colors)</tt></dd></dl>
<dl><dt><a name="Text-set_bbox"><strong>set_bbox</strong></a>(self, rectprops)</dt><dd><tt>Draw a bounding box around self. rect props are any settable<br>
properties for a rectangle, eg color='r', alpha=0.5<br>
<br>
ACCEPTS: rectangle prop dict plus key 'pad' which is a pad in points</tt></dd></dl>
<dl><dt><a name="Text-set_color"><strong>set_color</strong></a>(self, color)</dt><dd><tt>Set the foreground color of the text<br>
<br>
ACCEPTS: any matplotlib color - see help(colors)</tt></dd></dl>
<dl><dt><a name="Text-set_family"><strong>set_family</strong></a>(self, fontname)</dt><dd><tt>Set the font family<br>
<br>
ACCEPTS: [ 'serif' | 'sans-serif' | 'cursive' | 'fantasy' | 'monospace' ]</tt></dd></dl>
<dl><dt><a name="Text-set_fontname"><strong>set_fontname</strong></a>(self, fontname)</dt><dd><tt>alias for set_name</tt></dd></dl>
<dl><dt><a name="Text-set_fontproperties"><strong>set_fontproperties</strong></a>(self, fp)</dt><dd><tt>Set the font properties that control the text<br>
<br>
ACCEPTS: a matplotlib.font_manager.FontProperties instance</tt></dd></dl>
<dl><dt><a name="Text-set_fontsize"><strong>set_fontsize</strong></a>(self, fontsize)</dt><dd><tt>alias for set_size</tt></dd></dl>
<dl><dt><a name="Text-set_fontstyle"><strong>set_fontstyle</strong></a>(self, fontstyle)</dt><dd><tt>alias for set_style</tt></dd></dl>
<dl><dt><a name="Text-set_fontweight"><strong>set_fontweight</strong></a>(self, weight)</dt><dd><tt>alias for set_weight</tt></dd></dl>
<dl><dt><a name="Text-set_ha"><strong>set_ha</strong></a>(self, align)</dt><dd><tt>alias for set_horizontalalignment</tt></dd></dl>
<dl><dt><a name="Text-set_horizontalalignment"><strong>set_horizontalalignment</strong></a>(self, align)</dt><dd><tt>Set the horizontal alignment to one of<br>
<br>
ACCEPTS: [ 'center' | 'right' | 'left' ]</tt></dd></dl>
<dl><dt><a name="Text-set_ma"><strong>set_ma</strong></a>(self, align)</dt><dd><tt>alias for set_verticalalignment</tt></dd></dl>
<dl><dt><a name="Text-set_multialignment"><strong>set_multialignment</strong></a>(self, align)</dt><dd><tt>Set the alignment for multiple lines layout. The layout of the<br>
bounding box of all the lines is determined bu the horizontalalignment<br>
and verticalalignment properties, but the multiline text within that<br>
box can be<br>
<br>
ACCEPTS: ['left' | 'right' | 'center' ]</tt></dd></dl>
<dl><dt><a name="Text-set_name"><strong>set_name</strong></a>(self, fontname)</dt><dd><tt>Set the font name, <br>
<br>
ACCEPTS: string eg, ['Sans' | 'Courier' | 'Helvetica' ...]</tt></dd></dl>
<dl><dt><a name="Text-set_position"><strong>set_position</strong></a>(self, xy)</dt><dd><tt>Set the xy position of the text<br>
<br>
ACCEPTS: (x,y)</tt></dd></dl>
<dl><dt><a name="Text-set_rotation"><strong>set_rotation</strong></a>(self, s)</dt><dd><tt>Set the rotation of the text<br>
<br>
ACCEPTS: [ angle in degrees 'vertical' | 'horizontal'</tt></dd></dl>
<dl><dt><a name="Text-set_size"><strong>set_size</strong></a>(self, fontsize)</dt><dd><tt>Set the font size, eg, 8, 10, 12, 14...<br>
<br>
ACCEPTS: [ size in points | relative size eg 'smaller', 'x-large' ]</tt></dd></dl>
<dl><dt><a name="Text-set_style"><strong>set_style</strong></a>(self, fontstyle)</dt><dd><tt>Set the font style<br>
<br>
ACCEPTS: [ 'normal' | 'italic' | 'oblique']</tt></dd></dl>
<dl><dt><a name="Text-set_text"><strong>set_text</strong></a>(self, s)</dt><dd><tt>Set the text string s<br>
<br>
ACCEPTS: string</tt></dd></dl>
<dl><dt><a name="Text-set_va"><strong>set_va</strong></a>(self, align)</dt><dd><tt>alias for set_verticalalignment</tt></dd></dl>
<dl><dt><a name="Text-set_variant"><strong>set_variant</strong></a>(self, variant)</dt><dd><tt>Set the font variant, eg, <br>
<br>
ACCEPTS: [ 'normal' | 'small-caps' ]</tt></dd></dl>
<dl><dt><a name="Text-set_verticalalignment"><strong>set_verticalalignment</strong></a>(self, align)</dt><dd><tt>Set the vertical alignment<br>
<br>
ACCEPTS: [ 'center' | 'top' | 'bottom' ]</tt></dd></dl>
<dl><dt><a name="Text-set_weight"><strong>set_weight</strong></a>(self, weight)</dt><dd><tt>Set the font weight<br>
<br>
ACCEPTS: [ 'normal' | 'bold' | 'heavy' | 'light' | 'ultrabold' | 'ultralight']</tt></dd></dl>
<dl><dt><a name="Text-set_x"><strong>set_x</strong></a>(self, x)</dt><dd><tt>Set the x position of the text<br>
<br>
ACCEPTS: float</tt></dd></dl>
<dl><dt><a name="Text-set_y"><strong>set_y</strong></a>(self, y)</dt><dd><tt>Set the y position of the text<br>
<br>
ACCEPTS: float</tt></dd></dl>
<dl><dt><a name="Text-update_from"><strong>update_from</strong></a>(self, other)</dt><dd><tt>Copy properties from t to self</tt></dd></dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>zorder</strong> = 3</dl>
<hr>
Methods inherited from <a href="matplotlib.artist.html#Artist">matplotlib.artist.Artist</a>:<br>
<dl><dt><a name="Text-add_callback"><strong>add_callback</strong></a>(self, func)</dt></dl>
<dl><dt><a name="Text-get_alpha"><strong>get_alpha</strong></a>(self)</dt><dd><tt>Return the alpha value used for blending - not supported on all<br>
backends</tt></dd></dl>
<dl><dt><a name="Text-get_clip_box"><strong>get_clip_box</strong></a>(self)</dt><dd><tt>Return artist clipbox</tt></dd></dl>
<dl><dt><a name="Text-get_clip_on"><strong>get_clip_on</strong></a>(self)</dt><dd><tt>Return whether artist uses clipping</tt></dd></dl>
<dl><dt><a name="Text-get_figure"><strong>get_figure</strong></a>(self)</dt><dd><tt>return the figure instance</tt></dd></dl>
<dl><dt><a name="Text-get_label"><strong>get_label</strong></a>(self)</dt></dl>
<dl><dt><a name="Text-get_transform"><strong>get_transform</strong></a>(self)</dt><dd><tt>return the Transformation instance used by this artist</tt></dd></dl>
<dl><dt><a name="Text-get_visible"><strong>get_visible</strong></a>(self)</dt><dd><tt>return the artist's visiblity</tt></dd></dl>
<dl><dt><a name="Text-get_zorder"><strong>get_zorder</strong></a>(self)</dt></dl>
<dl><dt><a name="Text-is_figure_set"><strong>is_figure_set</strong></a>(self)</dt></dl>
<dl><dt><a name="Text-is_transform_set"><strong>is_transform_set</strong></a>(self)</dt><dd><tt><a href="matplotlib.artist.html#Artist">Artist</a> has transform explicity let</tt></dd></dl>
<dl><dt><a name="Text-pchanged"><strong>pchanged</strong></a>(self)</dt><dd><tt>fire event when property changed</tt></dd></dl>
<dl><dt><a name="Text-remove_callback"><strong>remove_callback</strong></a>(self, oid)</dt></dl>
<dl><dt><a name="Text-set_alpha"><strong>set_alpha</strong></a>(self, alpha)</dt><dd><tt>Set the alpha value used for blending - not supported on<br>
all backends<br>
<br>
ACCEPTS: float</tt></dd></dl>
<dl><dt><a name="Text-set_clip_box"><strong>set_clip_box</strong></a>(self, clipbox)</dt><dd><tt>Set the artist's clip Bbox<br>
<br>
ACCEPTS: a matplotlib.transform.Bbox instance</tt></dd></dl>
<dl><dt><a name="Text-set_clip_on"><strong>set_clip_on</strong></a>(self, b)</dt><dd><tt>Set whether artist uses clipping<br>
<br>
ACCEPTS: [True | False]</tt></dd></dl>
<dl><dt><a name="Text-set_figure"><strong>set_figure</strong></a>(self, fig)</dt><dd><tt>Set the figure instance the artist belong to<br>
<br>
ACCEPTS: a matplotlib.figure.Figure instance</tt></dd></dl>
<dl><dt><a name="Text-set_label"><strong>set_label</strong></a>(self, s)</dt><dd><tt>Set the line label to s for auto legend<br>
<br>
ACCEPTS: any string</tt></dd></dl>
<dl><dt><a name="Text-set_lod"><strong>set_lod</strong></a>(self, on)</dt><dd><tt>Set Level of Detail on or off. If on, the artists may examine<br>
things like the pixel width of the axes and draw a subset of<br>
their contents accordingly<br>
<br>
ACCEPTS: [True | False]</tt></dd></dl>
<dl><dt><a name="Text-set_transform"><strong>set_transform</strong></a>(self, t)</dt><dd><tt>set the Transformation instance used by this artist<br>
<br>
ACCEPTS: a matplotlib.transform transformation instance</tt></dd></dl>
<dl><dt><a name="Text-set_visible"><strong>set_visible</strong></a>(self, b)</dt><dd><tt>set the artist's visiblity<br>
<br>
ACCEPTS: [True | False]</tt></dd></dl>
<dl><dt><a name="Text-set_zorder"><strong>set_zorder</strong></a>(self, level)</dt><dd><tt>Set the zorder for the artist<br>
<br>
ACCEPTS: any number</tt></dd></dl>
<dl><dt><a name="Text-update"><strong>update</strong></a>(self, props)</dt></dl>
<hr>
Data and other attributes inherited from <a href="matplotlib.artist.html#Artist">matplotlib.artist.Artist</a>:<br>
<dl><dt><strong>aname</strong> = 'Artist'</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="-array"><strong>array</strong></a>(...)</dt><dd><tt><a href="#-array">array</a>(sequence, typecode=None, copy=1, savespace=0) will return a new array formed from the given (potentially nested) sequence with type given by typecode. If no typecode is given, then the type will be determined as the minimum type required to hold the objects in sequence. If copy is zero and sequence is already an array, a reference will be returned. If savespace is nonzero, the new array will maintain its precision in operations.</tt></dd></dl>
<dl><dt><a name="-scanner"><strong>scanner</strong></a>(s)</dt><dd><tt>Split a string into mathtext and non-mathtext parts. mathtext is<br>
surrounded by $ symbols. quoted \$ are ignored<br>
<br>
All slash quotes dollar signs are ignored<br>
<br>
The number of unquoted dollar signs must be even<br>
<br>
Return value is a list of (substring, inmath) tuples</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>cos</strong> = <ufunc 'cos'><br>
<strong>division</strong> = _Feature((2, 2, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 8192)<br>
<strong>equal</strong> = <ufunc 'equal'><br>
<strong>pi</strong> = 3.1415926535897931<br>
<strong>rcParams</strong> = {'axes.edgecolor': 'black', 'axes.facecolor': 'white', 'axes.grid': False, 'axes.hold': True, 'axes.labelcolor': 'black', 'axes.labelsize': 12.0, 'axes.linewidth': 1.0, 'axes.titlesize': 14.0, 'backend': 'WXAgg', 'datapath': '/usr/local/share/matplotlib', ...}<br>
<strong>sin</strong> = <ufunc 'sin'><br>
<strong>verbose</strong> = <matplotlib.Verbose instance></td></tr></table>
@footer@