165 lines (113 with data), 12.4 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="#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>
<br>
Publicly accessible attributes<br>
dpi : a DPI instance<br>
bbox : the display bounding box Bound2D instance<br>
transx : the transform of the x data<br>
transy : the transform of the y data<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, dpi, bbox, x<font color="#909090">=0</font>, y<font color="#909090">=0</font>, text<font color="#909090">=''</font>, color<font color="#909090">='k'</font>, verticalalignment<font color="#909090">='bottom'</font>, horizontalalignment<font color="#909090">='left'</font>, fontproperties<font color="#909090">=<matplotlib.font_manager.FontProperties instance></font>, rotation<font color="#909090">=None</font>, transx<font color="#909090">=Transform: Bound1D: 0 1 to Bound1D: 0 1</font>, transy<font color="#909090">=Transform: Bound1D: 0 1 to Bound1D: 0 1</font>)</dt></dl>
<dl><dt><a name="Text-copy_properties"><strong>copy_properties</strong></a>(self, text)</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_fontangle"><strong>get_fontangle</strong></a>(self)</dt><dd><tt>Get the font angle as string</tt></dd></dl>
<dl><dt><a name="Text-get_fontname"><strong>get_fontname</strong></a>(self)</dt><dd><tt>Return the font name as string</tt></dd></dl>
<dl><dt><a name="Text-get_fontsize"><strong>get_fontsize</strong></a>(self)</dt><dd><tt>Return the font size as integer</tt></dd></dl>
<dl><dt><a name="Text-get_fontstyle"><strong>get_fontstyle</strong></a>(self)</dt><dd><tt>Return the font style as string</tt></dd></dl>
<dl><dt><a name="Text-get_fontweight"><strong>get_fontweight</strong></a>(self)</dt><dd><tt>Get the font weight as string</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_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 rotation arg</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_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_window_extent"><strong>get_window_extent</strong></a>(self, renderer)</dt><dd><tt>Return the bounding box of the text in window coords as a<br>
Bound2D instance</tt></dd></dl>
<dl><dt><a name="Text-get_xy_display"><strong>get_xy_display</strong></a>(self)</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</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</tt></dd></dl>
<dl><dt><a name="Text-set_family"><strong>set_family</strong></a>(self, fontname)</dt><dd><tt>Set the font name, eg, 'Sans', 'Courier', 'Helvetica'</tt></dd></dl>
<dl><dt><a name="Text-set_fontangle"><strong>set_fontangle</strong></a>(self, style)</dt><dd><tt>Set the font angle, one of 'normal', 'italic', 'oblique'</tt></dd></dl>
<dl><dt><a name="Text-set_fontname"><strong>set_fontname</strong></a>(self, fontname)</dt><dd><tt>Set the font name, eg, 'Sans', 'Courier', 'Helvetica'</tt></dd></dl>
<dl><dt><a name="Text-set_fontproperties"><strong>set_fontproperties</strong></a>(self, fp)</dt></dl>
<dl><dt><a name="Text-set_fontsize"><strong>set_fontsize</strong></a>(self, fontsize)</dt><dd><tt>Set the font size, eg, 8, 10, 12, 14...</tt></dd></dl>
<dl><dt><a name="Text-set_fontstyle"><strong>set_fontstyle</strong></a>(self, fontstyle)</dt><dd><tt>Set the font style, one of 'normal', 'italic', 'oblique'</tt></dd></dl>
<dl><dt><a name="Text-set_fontweight"><strong>set_fontweight</strong></a>(self, weight)</dt><dd><tt>Set the font weight, one of:<br>
'normal', 'bold', 'heavy', 'light', 'ultrabold', 'ultralight'</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>
'center', 'right', or 'left'</tt></dd></dl>
<dl><dt><a name="Text-set_position"><strong>set_position</strong></a>(self, xy)</dt></dl>
<dl><dt><a name="Text-set_rotation"><strong>set_rotation</strong></a>(self, s)</dt><dd><tt>Currently only s='vertical', or s='horizontal' are supported</tt></dd></dl>
<dl><dt><a name="Text-set_text"><strong>set_text</strong></a>(self, text)</dt><dd><tt>Set the text</tt></dd></dl>
<dl><dt><a name="Text-set_transx"><strong>set_transx</strong></a>(self, tx)</dt></dl>
<dl><dt><a name="Text-set_transy"><strong>set_transy</strong></a>(self, ty)</dt></dl>
<dl><dt><a name="Text-set_verticalalignment"><strong>set_verticalalignment</strong></a>(self, align)</dt><dd><tt>Set the vertical alignment to one of<br>
'center', 'top', or 'bottom'</tt></dd></dl>
<dl><dt><a name="Text-set_x"><strong>set_x</strong></a>(self, x)</dt></dl>
<dl><dt><a name="Text-set_y"><strong>set_y</strong></a>(self, y)</dt></dl>
<dl><dt><a name="Text-update_properties"><strong>update_properties</strong></a>(self, d)</dt><dd><tt>Update the font attributes with the dictionary in d</tt></dd></dl>
<hr>
Methods inherited from <a href="matplotlib.artist.html#Artist">matplotlib.artist.Artist</a>:<br>
<dl><dt><a name="Text-draw"><strong>draw</strong></a>(self, renderer<font color="#909090">=None</font>, *args, **kwargs)</dt><dd><tt>Derived classes drawing method</tt></dd></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<br>
all backends</tt></dd></dl>
<dl><dt><a name="Text-get_child_artists"><strong>get_child_artists</strong></a>(self)</dt><dd><tt>Return all artists contained in self</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_dpi"><strong>get_dpi</strong></a>(self)</dt><dd><tt>Get the DPI of the display</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-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</tt></dd></dl>
<dl><dt><a name="Text-set_child_attr"><strong>set_child_attr</strong></a>(self, attr, val)</dt><dd><tt>Set attribute attr for self, and all child artists</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 is clipped to bbox</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</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</tt></dd></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="#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>division</strong> = _Feature((2, 2, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 8192)<br>
<strong>rcParams</strong> = {'axes.edgecolor': 'k', 'axes.facecolor': 'w', 'axes.grid': False, 'axes.labelcolor': 'k', 'axes.labelsize': 12.0, 'axes.linewidth': 0.5, 'axes.titlesize': 14.0, 'backend': 'GTK', 'datapath': '/usr/local/share/matplotlib', 'figure.dpi': 80.0, ...}</td></tr></table>
@footer@