324 lines (246 with data), 22.6 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>.lines</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/lines.py">/usr/lib/python2.4/site-packages/matplotlib/lines.py</a></font></td></tr></table>
<p><tt>This module contains all the 2D line class which can draw with a<br>
variety of line styles, markers and colors</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="matplotlib.agg.html">matplotlib.agg</a><br>
<a href="matplotlib.numerix.ma.html">matplotlib.numerix.ma</a><br>
</td><td width="25%" valign=top><a href="math.html">math</a><br>
<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></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.lines.html#Line2D">Line2D</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="Line2D">class <strong>Line2D</strong></a>(<a href="matplotlib.artist.html#Artist">matplotlib.artist.Artist</a>)</font></td></tr>
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Line2D-__init__"><strong>__init__</strong></a>(self, xdata, ydata, linewidth<font color="#909090">=None</font>, linestyle<font color="#909090">=None</font>, color<font color="#909090">=None</font>, marker<font color="#909090">=None</font>, markersize<font color="#909090">=None</font>, markeredgewidth<font color="#909090">=None</font>, markeredgecolor<font color="#909090">=None</font>, markerfacecolor<font color="#909090">=None</font>, antialiased<font color="#909090">=None</font>)</dt><dd><tt>xdata is a sequence of x data<br>
ydata is a sequence of y data<br>
linewidth is the width of the line in points<br>
linestyle is one of lineStyles<br>
marker is one of lineMarkers or None<br>
markersize is the size of the marker in points<br>
markeredgecolor and markerfacecolor can be any color arg<br>
markeredgewidth is the size of the markter edge in points</tt></dd></dl>
<dl><dt><a name="Line2D-draw"><strong>draw</strong></a>(self, renderer)</dt></dl>
<dl><dt><a name="Line2D-get_aa"><strong>get_aa</strong></a>(self)</dt><dd><tt>alias for get_antialiased</tt></dd></dl>
<dl><dt><a name="Line2D-get_antialiased"><strong>get_antialiased</strong></a>(self)</dt></dl>
<dl><dt><a name="Line2D-get_c"><strong>get_c</strong></a>(self)</dt><dd><tt>alias for get_color</tt></dd></dl>
<dl><dt><a name="Line2D-get_color"><strong>get_color</strong></a>(self)</dt></dl>
<dl><dt><a name="Line2D-get_linestyle"><strong>get_linestyle</strong></a>(self)</dt></dl>
<dl><dt><a name="Line2D-get_linewidth"><strong>get_linewidth</strong></a>(self)</dt></dl>
<dl><dt><a name="Line2D-get_ls"><strong>get_ls</strong></a>(self)</dt><dd><tt>alias for get_linestyle</tt></dd></dl>
<dl><dt><a name="Line2D-get_lw"><strong>get_lw</strong></a>(self)</dt><dd><tt>alias for get_linewidth</tt></dd></dl>
<dl><dt><a name="Line2D-get_marker"><strong>get_marker</strong></a>(self)</dt></dl>
<dl><dt><a name="Line2D-get_markeredgecolor"><strong>get_markeredgecolor</strong></a>(self)</dt></dl>
<dl><dt><a name="Line2D-get_markeredgewidth"><strong>get_markeredgewidth</strong></a>(self)</dt></dl>
<dl><dt><a name="Line2D-get_markerfacecolor"><strong>get_markerfacecolor</strong></a>(self)</dt></dl>
<dl><dt><a name="Line2D-get_markersize"><strong>get_markersize</strong></a>(self)</dt></dl>
<dl><dt><a name="Line2D-get_mec"><strong>get_mec</strong></a>(self)</dt><dd><tt>alias for get_markeredgecolor</tt></dd></dl>
<dl><dt><a name="Line2D-get_mew"><strong>get_mew</strong></a>(self)</dt><dd><tt>alias for get_markeredgewidth</tt></dd></dl>
<dl><dt><a name="Line2D-get_mfc"><strong>get_mfc</strong></a>(self)</dt><dd><tt>alias for get_markerfacecolor</tt></dd></dl>
<dl><dt><a name="Line2D-get_ms"><strong>get_ms</strong></a>(self)</dt><dd><tt>alias for get_markersize</tt></dd></dl>
<dl><dt><a name="Line2D-get_window_extent"><strong>get_window_extent</strong></a>(self, renderer)</dt></dl>
<dl><dt><a name="Line2D-get_xdata"><strong>get_xdata</strong></a>(self, valid_only<font color="#909090">=False</font>)</dt></dl>
<dl><dt><a name="Line2D-get_ydata"><strong>get_ydata</strong></a>(self, valid_only<font color="#909090">=False</font>)</dt></dl>
<dl><dt><a name="Line2D-set_aa"><strong>set_aa</strong></a>(self, val)</dt><dd><tt>alias for set_antialiased</tt></dd></dl>
<dl><dt><a name="Line2D-set_antialiased"><strong>set_antialiased</strong></a>(self, b)</dt><dd><tt>True if line should be drawin with antialiased rendering<br>
<br>
ACCEPTS: [True | False]</tt></dd></dl>
<dl><dt><a name="Line2D-set_c"><strong>set_c</strong></a>(self, val)</dt><dd><tt>alias for set_color</tt></dd></dl>
<dl><dt><a name="Line2D-set_color"><strong>set_color</strong></a>(self, color)</dt><dd><tt>Set the color of the line<br>
<br>
ACCEPTS: any matplotlib color - see help(colors)</tt></dd></dl>
<dl><dt><a name="Line2D-set_dashes"><strong>set_dashes</strong></a>(self, seq)</dt><dd><tt>Set the dash sequence, sequence of dashes with on off ink in points<br>
<br>
ACCEPTS: sequence of on/off ink in points</tt></dd></dl>
<dl><dt><a name="Line2D-set_data"><strong>set_data</strong></a>(self, *args)</dt><dd><tt>Set the x and y data<br>
<br>
ACCEPTS: (array xdata, array ydata)</tt></dd></dl>
<dl><dt><a name="Line2D-set_data_clipping"><strong>set_data_clipping</strong></a>(self, b)</dt><dd><tt>b is a boolean that sets whether data clipping is on<br>
<br>
ACCEPTS: [True | False]</tt></dd></dl>
<dl><dt><a name="Line2D-set_linestyle"><strong>set_linestyle</strong></a>(self, s)</dt><dd><tt>Set the linestyle of the line<br>
<br>
ACCEPTS: [ '-' | '--' | '-.' | ':' | 'steps' | 'None' ]</tt></dd></dl>
<dl><dt><a name="Line2D-set_linewidth"><strong>set_linewidth</strong></a>(self, w)</dt><dd><tt>Set the line width in points<br>
<br>
ACCEPTS: float value in points</tt></dd></dl>
<dl><dt><a name="Line2D-set_ls"><strong>set_ls</strong></a>(self, val)</dt><dd><tt>alias for set_linestyle</tt></dd></dl>
<dl><dt><a name="Line2D-set_lw"><strong>set_lw</strong></a>(self, val)</dt><dd><tt>alias for set_linewidth</tt></dd></dl>
<dl><dt><a name="Line2D-set_marker"><strong>set_marker</strong></a>(self, marker)</dt><dd><tt>Set the line marker<br>
<br>
ACCEPTS: [ '+' | ',' | '.' | '1' | '2' | '3' | '4' | '<' | '>' | 'D' | 'H' | '^' | '_' | 'd' | 'h' | 'o' | 'p' | 's' | 'v' | 'x' | '|' ]</tt></dd></dl>
<dl><dt><a name="Line2D-set_markeredgecolor"><strong>set_markeredgecolor</strong></a>(self, ec)</dt><dd><tt>Set the marker edge color<br>
<br>
ACCEPTS: any matplotlib color - see help(colors)</tt></dd></dl>
<dl><dt><a name="Line2D-set_markeredgewidth"><strong>set_markeredgewidth</strong></a>(self, ew)</dt><dd><tt>Set the marker edge width in points<br>
<br>
ACCEPTS: float value in points</tt></dd></dl>
<dl><dt><a name="Line2D-set_markerfacecolor"><strong>set_markerfacecolor</strong></a>(self, fc)</dt><dd><tt>Set the marker face color<br>
<br>
ACCEPTS: any matplotlib color - see help(colors)</tt></dd></dl>
<dl><dt><a name="Line2D-set_markersize"><strong>set_markersize</strong></a>(self, sz)</dt><dd><tt>Set the marker size in points<br>
<br>
ACCEPTS: float</tt></dd></dl>
<dl><dt><a name="Line2D-set_mec"><strong>set_mec</strong></a>(self, val)</dt><dd><tt>alias for set_markeredgecolor</tt></dd></dl>
<dl><dt><a name="Line2D-set_mew"><strong>set_mew</strong></a>(self, val)</dt><dd><tt>alias for set_markeredgewidth</tt></dd></dl>
<dl><dt><a name="Line2D-set_mfc"><strong>set_mfc</strong></a>(self, val)</dt><dd><tt>alias for set_markerfacecolor</tt></dd></dl>
<dl><dt><a name="Line2D-set_ms"><strong>set_ms</strong></a>(self, val)</dt><dd><tt>alias for set_markersize</tt></dd></dl>
<dl><dt><a name="Line2D-set_xclip"><strong>set_xclip</strong></a>(self, *args)</dt><dd><tt>Set the x clipping range for data clipping to xmin, xmax<br>
<br>
ACCEPTS: (xmin, xmax)</tt></dd></dl>
<dl><dt><a name="Line2D-set_xdata"><strong>set_xdata</strong></a>(self, x)</dt><dd><tt>Set the data array for x<br>
<br>
ACCEPTS: array</tt></dd></dl>
<dl><dt><a name="Line2D-set_yclip"><strong>set_yclip</strong></a>(self, *args)</dt><dd><tt>Set the y clipping range for data clipping to ymin, ymax<br>
<br>
ACCEPTS: (ymin, ymax)</tt></dd></dl>
<dl><dt><a name="Line2D-set_ydata"><strong>set_ydata</strong></a>(self, y)</dt><dd><tt>Set the data array for y<br>
<br>
ACCEPTS: array</tt></dd></dl>
<dl><dt><a name="Line2D-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 defined here:<br>
<dl><dt><strong>zorder</strong> = 2</dl>
<hr>
Methods inherited from <a href="matplotlib.artist.html#Artist">matplotlib.artist.Artist</a>:<br>
<dl><dt><a name="Line2D-add_callback"><strong>add_callback</strong></a>(self, func)</dt></dl>
<dl><dt><a name="Line2D-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="Line2D-get_clip_box"><strong>get_clip_box</strong></a>(self)</dt><dd><tt>Return artist clipbox</tt></dd></dl>
<dl><dt><a name="Line2D-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="Line2D-get_figure"><strong>get_figure</strong></a>(self)</dt><dd><tt>return the figure instance</tt></dd></dl>
<dl><dt><a name="Line2D-get_label"><strong>get_label</strong></a>(self)</dt></dl>
<dl><dt><a name="Line2D-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="Line2D-get_visible"><strong>get_visible</strong></a>(self)</dt><dd><tt>return the artist's visiblity</tt></dd></dl>
<dl><dt><a name="Line2D-get_zorder"><strong>get_zorder</strong></a>(self)</dt></dl>
<dl><dt><a name="Line2D-is_figure_set"><strong>is_figure_set</strong></a>(self)</dt></dl>
<dl><dt><a name="Line2D-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="Line2D-pchanged"><strong>pchanged</strong></a>(self)</dt><dd><tt>fire event when property changed</tt></dd></dl>
<dl><dt><a name="Line2D-remove_callback"><strong>remove_callback</strong></a>(self, oid)</dt></dl>
<dl><dt><a name="Line2D-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="Line2D-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="Line2D-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="Line2D-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="Line2D-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="Line2D-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="Line2D-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="Line2D-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="Line2D-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="Line2D-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="Line2D-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="-arange"><strong>arange</strong></a>(...)</dt><dd><tt><a href="#-arange">arange</a>(start, stop=None, step=1, typecode=None)<br>
<br>
Just like range() except it returns an array whose type can be<br>
specified by the keyword argument typecode.</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="-searchsorted"><strong>searchsorted</strong></a> = binarysearch(...)</dt><dd><tt>binarysearch(a,v)</tt></dd></dl>
<dl><dt><a name="-take"><strong>take</strong></a>(...)</dt><dd><tt><a href="#-take">take</a>(a, indices, axis=0). Selects the elements in indices from array a along the given axis.</tt></dd></dl>
<dl><dt><a name="-unmasked_index_ranges"><strong>unmasked_index_ranges</strong></a>(mask, compressed<font color="#909090">=True</font>)</dt><dd><tt>Calculate the good data ranges in a masked 1-D array, based on mask.<br>
<br>
Returns Nx2 array with each row the start and stop indices<br>
for slices of the compressed array corresponding to each of N<br>
uninterrupted runs of unmasked values.<br>
If optional argument compressed is False, it returns the<br>
start and stop indices into the original array, not the<br>
compressed array.<br>
In either case, an empty array is returned if there are no<br>
unmasked values.<br>
<br>
Example:<br>
<br>
y = ma.<a href="#-array">array</a>(<a href="#-arange">arange</a>(5), mask = [0,0,1,0,0])<br>
ii = <a href="#-unmasked_index_ranges">unmasked_index_ranges</a>(y.mask())<br>
# returns [[0,2,] [2,4,]]<br>
<br>
y.compressed().filled()[ii[1,0]:ii[1,1]]<br>
# returns array [3,4,]<br>
# (The 'filled()' method converts the masked array to a numerix array.)<br>
<br>
i0, i1 = <a href="#-unmasked_index_ranges">unmasked_index_ranges</a>(y.mask(), compressed=False)<br>
# returns [[0,3,] [2,5,]]<br>
<br>
y.filled()[ii[1,0]:ii[1,1]]<br>
# returns array [3,4,]</tt></dd></dl>
<dl><dt><a name="-zeros"><strong>zeros</strong></a>(...)</dt><dd><tt><a href="#-zeros">zeros</a>((d1,...,dn),typecode='l',savespace=0) will return a new array of shape (d1,...,dn) and type typecode with all it's entries initialized to zero. If savespace is nonzero the array will be a spacesaver array.</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>LOG10</strong> = 1<br>
<strong>TICKDOWN</strong> = 3<br>
<strong>TICKLEFT</strong> = 0<br>
<strong>TICKRIGHT</strong> = 1<br>
<strong>TICKUP</strong> = 2<br>
<strong>colorConverter</strong> = <matplotlib.colors.ColorConverter instance><br>
<strong>cos</strong> = <ufunc 'cos'><br>
<strong>division</strong> = _Feature((2, 2, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 8192)<br>
<strong>greater</strong> = <ufunc 'greater'><br>
<strong>less</strong> = <ufunc 'less'><br>
<strong>lineMarkers</strong> = {0: 1, 1: 1, 2: 1, 3: 1, '+': 1, ',': 1, '.': 1, '1': 1, '2': 1, '3': 1, ...}<br>
<strong>lineStyles</strong> = {'-': 1, '--': 1, '-.': 1, ':': 1, 'None': 1, 'steps': 1}<br>
<strong>logical_and</strong> = <ufunc 'logical_and'><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': 'TkAgg', 'datapath': '/usr/share/matplotlib', ...}<br>
<strong>sin</strong> = <ufunc 'sin'><br>
<strong>verbose</strong> = <matplotlib.Verbose instance></td></tr></table>
@footer@