218 lines (177 with data), 16.7 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>.legend</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/lib/python2.4/site-packages/matplotlib/legend.py">/usr/lib/python2.4/site-packages/matplotlib/legend.py</a></font></td></tr></table>
<p><tt>Place a legend on the axes at location loc. Labels are a<br>
sequence of strings and loc can be a string or an integer<br>
specifying the legend location<br>
<br>
The location codes are<br>
<br>
'best' : 0,<br>
'upper right' : 1, (default)<br>
'upper left' : 2,<br>
'lower left' : 3,<br>
'lower right' : 4,<br>
'right' : 5,<br>
'center left' : 6,<br>
'center right' : 7,<br>
'lower center' : 8,<br>
'upper center' : 9,<br>
'center' : 10,<br>
<br>
Return value is a sequence of text, line instances that make<br>
up the legend</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="sys.html">sys</a><br>
</td><td width="25%" valign=top><a href="warnings.html">warnings</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.artist.html#Artist">matplotlib.artist.Artist</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="matplotlib.legend.html#Legend">Legend</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="Legend">class <strong>Legend</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>Place a legend on the axes at location loc. Labels are a<br>
sequence of strings and loc can be a string or an integer<br>
specifying the legend location<br>
<br>
The location codes are<br>
<br>
'best' : 0,<br>
'upper right' : 1, (default)<br>
'upper left' : 2,<br>
'lower left' : 3,<br>
'lower right' : 4,<br>
'right' : 5,<br>
'center left' : 6,<br>
'center right' : 7,<br>
'lower center' : 8,<br>
'upper center' : 9,<br>
'center' : 10,<br>
<br>
Return value is a sequence of text, line instances that make<br>
up the legend<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Legend-__init__"><strong>__init__</strong></a>(self, parent, handles, labels, loc, isaxes<font color="#909090">=True</font>, numpoints<font color="#909090">=4</font>, prop<font color="#909090">=<matplotlib.font_manager.FontProperties instance></font>, pad<font color="#909090">=0.20000000000000001</font>, markerscale<font color="#909090">=0.59999999999999998</font>, labelsep<font color="#909090">=0.0050000000000000001</font>, handlelen<font color="#909090">=0.050000000000000003</font>, handletextsep<font color="#909090">=0.02</font>, axespad<font color="#909090">=0.02</font>, shadow<font color="#909090">=False</font>)</dt><dd><tt> parent # the artist that contains the legend<br>
handles # a list of artists (lines, patches) to add to the legend<br>
labels # a list of strings to label the legend<br>
loc # a location code<br>
isaxes=True # whether this is an axes legend<br>
numpoints = 4 # the number of points in the legend line<br>
fontprop = FontProperties(size='smaller') # the font property<br>
pad = 0.2 # the fractional whitespace inside the legend border<br>
markerscale = 0.6 # the relative size of legend markers vs. original<br>
shadow # if True, draw a shadow behind legend<br>
<br>
The following dimensions are in axes coords<br>
labelsep = 0.005 # the vertical space between the legend entries<br>
handlelen = 0.05 # the length of the legend lines<br>
handletextsep = 0.02 # the space between the legend line and legend text<br>
axespad = 0.02 # the border between the axes and legend edge</tt></dd></dl>
<dl><dt><a name="Legend-draw"><strong>draw</strong></a>(self, renderer)</dt></dl>
<dl><dt><a name="Legend-draw_frame"><strong>draw_frame</strong></a>(self, b)</dt><dd><tt>b is a boolean. Set draw frame to b</tt></dd></dl>
<dl><dt><a name="Legend-get_frame"><strong>get_frame</strong></a>(self)</dt><dd><tt>return the Rectangle instance used to frame the legend</tt></dd></dl>
<dl><dt><a name="Legend-get_lines"><strong>get_lines</strong></a>(self)</dt><dd><tt>return a list of lines.Line2D instances in the legend</tt></dd></dl>
<dl><dt><a name="Legend-get_patches"><strong>get_patches</strong></a>(self)</dt><dd><tt>return a list of patch instances in the legend</tt></dd></dl>
<dl><dt><a name="Legend-get_texts"><strong>get_texts</strong></a>(self)</dt><dd><tt>return a list of text.Text instance in the legend</tt></dd></dl>
<dl><dt><a name="Legend-get_window_extent"><strong>get_window_extent</strong></a>(self)</dt></dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>codes</strong> = {'best': 0, 'center': 10, 'center left': 6, 'center right': 7, 'lower center': 8, 'lower left': 3, 'lower right': 4, 'right': 5, 'upper center': 9, 'upper left': 2, ...}</dl>
<hr>
Methods inherited from <a href="matplotlib.artist.html#Artist">matplotlib.artist.Artist</a>:<br>
<dl><dt><a name="Legend-add_callback"><strong>add_callback</strong></a>(self, func)</dt></dl>
<dl><dt><a name="Legend-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="Legend-get_clip_box"><strong>get_clip_box</strong></a>(self)</dt><dd><tt>Return artist clipbox</tt></dd></dl>
<dl><dt><a name="Legend-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="Legend-get_figure"><strong>get_figure</strong></a>(self)</dt><dd><tt>return the figure instance</tt></dd></dl>
<dl><dt><a name="Legend-get_label"><strong>get_label</strong></a>(self)</dt></dl>
<dl><dt><a name="Legend-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="Legend-get_visible"><strong>get_visible</strong></a>(self)</dt><dd><tt>return the artist's visiblity</tt></dd></dl>
<dl><dt><a name="Legend-get_zorder"><strong>get_zorder</strong></a>(self)</dt></dl>
<dl><dt><a name="Legend-is_figure_set"><strong>is_figure_set</strong></a>(self)</dt></dl>
<dl><dt><a name="Legend-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="Legend-pchanged"><strong>pchanged</strong></a>(self)</dt><dd><tt>fire event when property changed</tt></dd></dl>
<dl><dt><a name="Legend-remove_callback"><strong>remove_callback</strong></a>(self, oid)</dt></dl>
<dl><dt><a name="Legend-set"><strong>set</strong></a>(self, **kwargs)</dt><dd><tt>A tkstyle set command, pass kwargs to set properties</tt></dd></dl>
<dl><dt><a name="Legend-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="Legend-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="Legend-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="Legend-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="Legend-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="Legend-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="Legend-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="Legend-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="Legend-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="Legend-update"><strong>update</strong></a>(self, props)</dt></dl>
<dl><dt><a name="Legend-update_from"><strong>update_from</strong></a>(self, other)</dt><dd><tt>copy properties from other to self</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>
<dl><dt><strong>zorder</strong> = 0</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="-Bbox"><strong>Bbox</strong></a>(...)</dt><dd><tt><a href="#-Bbox">Bbox</a>(ll, ur)</tt></dd></dl>
<dl><dt><a name="-Point"><strong>Point</strong></a>(...)</dt><dd><tt><a href="#-Point">Point</a>(x, y)</tt></dd></dl>
<dl><dt><a name="-Value"><strong>Value</strong></a>(...)</dt><dd><tt><a href="#-Value">Value</a>(x)</tt></dd></dl>
<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="-line_cuts_bbox"><strong>line_cuts_bbox</strong></a>(line, bbox)</dt><dd><tt>Return True if and only if line cuts bbox.</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>Float</strong> = 'd'<br>
<strong>division</strong> = _Feature((2, 2, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 8192)<br>
<strong>verbose</strong> = <matplotlib.Verbose instance></td></tr></table>
@footer@