151 lines (122 with data), 9.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>.legend</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="/matplotlib/legend.py">/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, (currently not supported, defaults to upper right)<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></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, (currently not supported, defaults to upper right)<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, axis, handles, labels, loc)</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_child_artists"><strong>get_child_artists</strong></a>(self)</dt></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>AXESPAD</strong> = 0.02</dl>
<dl><dt><strong>FONTSIZE</strong> = 10</dl>
<dl><dt><strong>HANDLELEN</strong> = 0.050000000000000003</dl>
<dl><dt><strong>HANDLETEXTSEP</strong> = 0.02</dl>
<dl><dt><strong>LABELSEP</strong> = 0.0050000000000000001</dl>
<dl><dt><strong>NUMPOINTS</strong> = 4</dl>
<dl><dt><strong>PAD</strong> = 0.20000000000000001</dl>
<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-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="Legend-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="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_dpi"><strong>get_dpi</strong></a>(self)</dt><dd><tt>Get the DPI of the display</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</tt></dd></dl>
<dl><dt><a name="Legend-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="Legend-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="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</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>Float</strong> = 'd'<br>
<strong>True</strong> = True<br>
<strong>division</strong> = _Feature((2, 2, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 8192)</td></tr></table>
@footer@