705 lines (573 with data), 56.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>.quiver</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/jdhunter/dev/lib/python2.5/site-packages/matplotlib/quiver.py">/home/jdhunter/dev/lib/python2.5/site-packages/matplotlib/quiver.py</a></font></td></tr></table>
<p><tt>Support for plotting fields of arrows.<br>
<br>
Presently this contains a single class, <a href="#Quiver">Quiver</a>, but it<br>
might make sense to consolidate other arrow plotting here.<br>
<br>
This will also become a home for things such as standard<br>
deviation ellipses, which can and will be derived very easily from<br>
the <a href="#Quiver">Quiver</a> code.</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.artist.html">matplotlib.artist</a><br>
<a href="matplotlib.collections.html">matplotlib.collections</a><br>
</td><td width="25%" valign=top><a href="matplotlib.font_manager.html">matplotlib.font_manager</a><br>
<a href="matplotlib.numerix.npyma.html">matplotlib.numerix.npyma</a><br>
</td><td width="25%" valign=top><a href="math.html">math</a><br>
<a href="numpy.html">numpy</a><br>
</td><td width="25%" valign=top><a href="matplotlib.text.html">matplotlib.text</a><br>
<a href="matplotlib.transforms.html">matplotlib.transforms</a><br>
</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.quiver.html#QuiverKey">QuiverKey</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="matplotlib.collections.html#PolyCollection">matplotlib.collections.PolyCollection</a>(<a href="matplotlib.collections.html#PatchCollection">matplotlib.collections.PatchCollection</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="matplotlib.quiver.html#Quiver">Quiver</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="Quiver">class <strong>Quiver</strong></a>(<a href="matplotlib.collections.html#PolyCollection">matplotlib.collections.PolyCollection</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>Specialized <a href="matplotlib.collections.html#PolyCollection">PolyCollection</a> for arrows.<br>
<br>
The only API method is <a href="#Quiver-set_UVC">set_UVC</a>(), which can be used<br>
to change the size, orientation, and color of the<br>
arrows; their locations are fixed when the class is<br>
instantiated. Possibly this method will be useful<br>
in animations.<br>
<br>
Much of the work in this class is done in the <a href="#Quiver-draw">draw</a>()<br>
method so that as much information as possible is available<br>
about the plot. In subsequent <a href="#Quiver-draw">draw</a>() calls, recalculation<br>
is limited to things that might have changed, so there<br>
should be no performance penalty from putting the calculations<br>
in the <a href="#Quiver-draw">draw</a>() method.<br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="matplotlib.quiver.html#Quiver">Quiver</a></dd>
<dd><a href="matplotlib.collections.html#PolyCollection">matplotlib.collections.PolyCollection</a></dd>
<dd><a href="matplotlib.collections.html#PatchCollection">matplotlib.collections.PatchCollection</a></dd>
<dd><a href="matplotlib.collections.html#Collection">matplotlib.collections.Collection</a></dd>
<dd><a href="matplotlib.artist.html#Artist">matplotlib.artist.Artist</a></dd>
<dd><a href="matplotlib.cm.html#ScalarMappable">matplotlib.cm.ScalarMappable</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="Quiver-__init__"><strong>__init__</strong></a>(self, ax, *args, **kw)</dt><dd><tt> The constructor takes one required argument, an Axes<br>
instance, followed by the args and kwargs described<br>
by the following pylab interface documentation:<br>
<br>
Plot a 2-D field of arrows.<br>
<br>
Function signatures:<br>
<br>
quiver(U, V, **kw)<br>
quiver(U, V, C, **kw)<br>
quiver(X, Y, U, V, **kw)<br>
quiver(X, Y, U, V, C, **kw)<br>
<br>
Arguments:<br>
<br>
X, Y give the x and y coordinates of the arrow locations<br>
(default is tail of arrow; see 'pivot' kwarg)<br>
U, V give the x and y components of the arrow vectors<br>
C is an optional array used to map colors to the arrows<br>
<br>
All arguments may be 1-D or 2-D arrays or sequences.<br>
If X and Y are absent, they will be generated as a uniform grid.<br>
If U and V are 2-D arrays but X and Y are 1-D, and if<br>
len(X) and len(Y) match the column and row dimensions<br>
of U, then X and Y will be expanded with meshgrid.<br>
U, V, C may be masked arrays, but masked X, Y are not<br>
supported at present.<br>
<br>
Keyword arguments (default given first):<br>
<br>
* units = 'width' | 'height' | 'dots' | 'inches' | 'x' | 'y'<br>
arrow units; the arrow dimensions *except for length*<br>
are in multiples of this unit.<br>
* scale = None | float<br>
data units per arrow unit, e.g. m/s per plot width;<br>
a smaller scale parameter makes the arrow longer.<br>
If None, a simple autoscaling algorithm is used, based<br>
on the average vector length and the number of vectors.<br>
<br>
Arrow dimensions and scales can be in any of several units:<br>
<br>
'width' or 'height': the width or height of the axes<br>
'dots' or 'inches': pixels or inches, based on the figure dpi<br>
'x' or 'y': X or Y data units<br>
<br>
In all cases the arrow aspect ratio is 1, so that if U==V the angle<br>
of the arrow on the plot is 45 degrees CCW from the X-axis.<br>
<br>
The arrows scale differently depending on the units, however.<br>
For 'x' or 'y', the arrows get larger as one zooms in; for other<br>
units, the arrow size is independent of the zoom state. For<br>
'width or 'height', the arrow size increases with the width and<br>
height of the axes, respectively, when the the window is resized;<br>
for 'dots' or 'inches', resizing does not change the arrows.<br>
<br>
<br>
* width = ? shaft width in arrow units; default depends on<br>
choice of units, above, and number of vectors;<br>
a typical starting value is about<br>
0.005 times the width of the plot.<br>
* headwidth = 3 head width as multiple of shaft width<br>
* headlength = 5 head length as multiple of shaft width<br>
* headaxislength = 4.5 head length at shaft intersection<br>
* minshaft = 1 length below which arrow scales, in units<br>
of head length. Do not set this to less<br>
than 1, or small arrows will look terrible!<br>
* minlength = 1 minimum length as a multiple of shaft width;<br>
if an arrow length is less than this, plot a<br>
dot (hexagon) of this diameter instead.<br>
<br>
The defaults give a slightly swept-back arrow; to make the<br>
head a triangle, make headaxislength the same as headlength.<br>
To make the arrow more pointed, reduce headwidth or increase<br>
headlength and headaxislength.<br>
To make the head smaller relative to the shaft, scale down<br>
all the head* parameters.<br>
You will probably do best to leave minshaft alone.<br>
<br>
* pivot = 'tail' | 'middle' | 'tip'<br>
The part of the arrow that is at the grid point; the arrow<br>
rotates about this point, hence the name 'pivot'.<br>
<br>
* color = 'k' | any matplotlib color spec or sequence of color specs.<br>
This is a synonym for the <a href="matplotlib.collections.html#PolyCollection">PolyCollection</a> facecolor kwarg.<br>
If C has been set, 'color' has no effect.<br>
<br>
* All <a href="matplotlib.collections.html#PolyCollection">PolyCollection</a> kwargs are valid, in the sense that they<br>
will be passed on to the <a href="matplotlib.collections.html#PolyCollection">PolyCollection</a> constructor.<br>
In particular, one might want to use, for example:<br>
linewidths = (1,), edgecolors = ('g',)<br>
to make the arrows have green outlines of unit width.</tt></dd></dl>
<dl><dt><a name="Quiver-draw"><strong>draw</strong></a>(self, renderer)</dt></dl>
<dl><dt><a name="Quiver-set_UVC"><strong>set_UVC</strong></a>(self, U, V, C<font color="#909090">=None</font>)</dt></dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>quiver_doc</strong> = '<font color="#c040c0">\n</font>Plot a 2-D field of arrows.<font color="#c040c0">\n\n</font>Function signature...e the arrows have green outlines of unit width.<font color="#c040c0">\n\n</font>'</dl>
<hr>
Methods inherited from <a href="matplotlib.collections.html#PolyCollection">matplotlib.collections.PolyCollection</a>:<br>
<dl><dt><a name="Quiver-get_verts"><strong>get_verts</strong></a>(self, dataTrans<font color="#909090">=None</font>)</dt><dd><tt>Return vertices in data coordinates.<br>
The calculation is incomplete in general; it is based<br>
on the vertices or the offsets, whichever is using<br>
dataTrans as its transformation, so it does not take<br>
into account the combined effect of segments and offsets.</tt></dd></dl>
<dl><dt><a name="Quiver-set_verts"><strong>set_verts</strong></a>(self, verts)</dt><dd><tt>This allows one to delay initialization of the vertices.</tt></dd></dl>
<hr>
Methods inherited from <a href="matplotlib.collections.html#PatchCollection">matplotlib.collections.PatchCollection</a>:<br>
<dl><dt><a name="Quiver-contains"><strong>contains</strong></a>(self, mouseevent)</dt><dd><tt>Test whether the mouse event occurred in the collection.<br>
<br>
Returns T/F, dict(ind=itemlist), where every item in itemlist contains the event.</tt></dd></dl>
<dl><dt><a name="Quiver-get_transformed_patches"><strong>get_transformed_patches</strong></a>(self)</dt><dd><tt>get a sequence of the polygons in the collection in display (transformed) space<br>
<br>
The ith element in the returned sequence is a list of x,y<br>
vertices defining the ith polygon</tt></dd></dl>
<dl><dt><a name="Quiver-get_transoffset"><strong>get_transoffset</strong></a>(self)</dt></dl>
<dl><dt><a name="Quiver-set_alpha"><strong>set_alpha</strong></a>(self, alpha)</dt><dd><tt>Set the alpha tranpancies of the collection. Alpha must be<br>
a float.<br>
<br>
ACCEPTS: float</tt></dd></dl>
<dl><dt><a name="Quiver-set_color"><strong>set_color</strong></a>(self, c)</dt><dd><tt>Set both the edgecolor and the facecolor.<br>
See set_facecolor and set_edgecolor.<br>
<br>
ACCEPTS: matplotlib color arg or sequence of rgba tuples</tt></dd></dl>
<dl><dt><a name="Quiver-set_edgecolor"><strong>set_edgecolor</strong></a>(self, c)</dt><dd><tt>Set the edgecolor(s) of the collection. c can be a matplotlib color<br>
arg (all patches have same color), or a a sequence or rgba tuples; if<br>
it is a sequence the patches will cycle through the sequence<br>
<br>
ACCEPTS: matplotlib color arg or sequence of rgba tuples</tt></dd></dl>
<dl><dt><a name="Quiver-set_edgecolors"><strong>set_edgecolors</strong></a>(self, c)</dt></dl>
<dl><dt><a name="Quiver-set_facecolor"><strong>set_facecolor</strong></a>(self, c)</dt><dd><tt>Set the facecolor(s) of the collection. c can be a matplotlib<br>
color arg (all patches have same color), or a a sequence or<br>
rgba tuples; if it is a sequence the patches will cycle<br>
through the sequence<br>
<br>
ACCEPTS: matplotlib color arg or sequence of rgba tuples</tt></dd></dl>
<dl><dt><a name="Quiver-set_facecolors"><strong>set_facecolors</strong></a>(self, c)</dt></dl>
<dl><dt><a name="Quiver-set_linewidth"><strong>set_linewidth</strong></a>(self, lw)</dt><dd><tt>Set the linewidth(s) for the collection. lw can be a scalar or a<br>
sequence; if it is a sequence the patches will cycle through the<br>
sequence<br>
<br>
ACCEPTS: float or sequence of floats</tt></dd></dl>
<dl><dt><a name="Quiver-set_linewidths"><strong>set_linewidths</strong></a> = set_linewidth(self, lw)</dt><dd><tt>Set the linewidth(s) for the collection. lw can be a scalar or a<br>
sequence; if it is a sequence the patches will cycle through the<br>
sequence<br>
<br>
ACCEPTS: float or sequence of floats</tt></dd></dl>
<dl><dt><a name="Quiver-set_lw"><strong>set_lw</strong></a> = set_linewidth(self, lw)</dt><dd><tt>Set the linewidth(s) for the collection. lw can be a scalar or a<br>
sequence; if it is a sequence the patches will cycle through the<br>
sequence<br>
<br>
ACCEPTS: float or sequence of floats</tt></dd></dl>
<dl><dt><a name="Quiver-update_scalarmappable"><strong>update_scalarmappable</strong></a>(self)</dt><dd><tt>If the scalar mappable array is not none, update facecolors<br>
from scalar data</tt></dd></dl>
<hr>
Data and other attributes inherited from <a href="matplotlib.collections.html#PatchCollection">matplotlib.collections.PatchCollection</a>:<br>
<dl><dt><strong>zorder</strong> = 1</dl>
<hr>
Methods inherited from <a href="matplotlib.artist.html#Artist">matplotlib.artist.Artist</a>:<br>
<dl><dt><a name="Quiver-add_callback"><strong>add_callback</strong></a>(self, func)</dt></dl>
<dl><dt><a name="Quiver-convert_xunits"><strong>convert_xunits</strong></a>(self, x)</dt><dd><tt>for artists in an axes, if the xaxis as units support,<br>
convert x using xaxis unit type</tt></dd></dl>
<dl><dt><a name="Quiver-convert_yunits"><strong>convert_yunits</strong></a>(self, y)</dt><dd><tt>for artists in an axes, if the yaxis as units support,<br>
convert y using yaxis unit type</tt></dd></dl>
<dl><dt><a name="Quiver-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="Quiver-get_animated"><strong>get_animated</strong></a>(self)</dt><dd><tt>return the artist's animated state</tt></dd></dl>
<dl><dt><a name="Quiver-get_axes"><strong>get_axes</strong></a>(self)</dt><dd><tt>return the axes instance the artist resides in, or None</tt></dd></dl>
<dl><dt><a name="Quiver-get_clip_box"><strong>get_clip_box</strong></a>(self)</dt><dd><tt>Return artist clipbox</tt></dd></dl>
<dl><dt><a name="Quiver-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="Quiver-get_clip_path"><strong>get_clip_path</strong></a>(self)</dt><dd><tt>Return artist clip path</tt></dd></dl>
<dl><dt><a name="Quiver-get_contains"><strong>get_contains</strong></a>(self)</dt><dd><tt>return the _contains test used by the artist, or None for default.</tt></dd></dl>
<dl><dt><a name="Quiver-get_figure"><strong>get_figure</strong></a>(self)</dt><dd><tt>return the figure instance</tt></dd></dl>
<dl><dt><a name="Quiver-get_label"><strong>get_label</strong></a>(self)</dt></dl>
<dl><dt><a name="Quiver-get_picker"><strong>get_picker</strong></a>(self)</dt><dd><tt>return the Pickeration instance used by this artist</tt></dd></dl>
<dl><dt><a name="Quiver-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="Quiver-get_visible"><strong>get_visible</strong></a>(self)</dt><dd><tt>return the artist's visiblity</tt></dd></dl>
<dl><dt><a name="Quiver-get_zorder"><strong>get_zorder</strong></a>(self)</dt></dl>
<dl><dt><a name="Quiver-have_units"><strong>have_units</strong></a>(self)</dt><dd><tt>return True if units are set on the x or y axes</tt></dd></dl>
<dl><dt><a name="Quiver-hitlist"><strong>hitlist</strong></a>(self, event)</dt><dd><tt>List the children of the artist which contain the mouse event</tt></dd></dl>
<dl><dt><a name="Quiver-is_figure_set"><strong>is_figure_set</strong></a>(self)</dt></dl>
<dl><dt><a name="Quiver-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="Quiver-pchanged"><strong>pchanged</strong></a>(self)</dt><dd><tt>fire event when property changed</tt></dd></dl>
<dl><dt><a name="Quiver-pick"><strong>pick</strong></a>(self, mouseevent)</dt><dd><tt><a href="#Quiver-pick">pick</a>(mouseevent)<br>
<br>
each child artist will fire a pick event if mouseevent is over<br>
the artist and the artist has picker set</tt></dd></dl>
<dl><dt><a name="Quiver-pickable"><strong>pickable</strong></a>(self)</dt><dd><tt>return True if self is pickable</tt></dd></dl>
<dl><dt><a name="Quiver-remove"><strong>remove</strong></a>(self)</dt><dd><tt>Remove the artist from the figure if possible. The effect will not<br>
be visible until the figure is redrawn, e.g., with ax.draw_idle().<br>
Call ax.relim() to update the axes limits if desired.<br>
<br>
Note: relim() will not see collections even if the collection<br>
was added to axes with autolim=True.<br>
<br>
Note: there is no support for removing the artist's legend entry.</tt></dd></dl>
<dl><dt><a name="Quiver-remove_callback"><strong>remove_callback</strong></a>(self, oid)</dt></dl>
<dl><dt><a name="Quiver-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="Quiver-set_animated"><strong>set_animated</strong></a>(self, b)</dt><dd><tt>set the artist's animation state<br>
<br>
ACCEPTS: [True | False]</tt></dd></dl>
<dl><dt><a name="Quiver-set_axes"><strong>set_axes</strong></a>(self, axes)</dt><dd><tt>set the axes instance the artist resides in, if any<br>
<br>
ACCEPTS: an axes instance</tt></dd></dl>
<dl><dt><a name="Quiver-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="Quiver-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="Quiver-set_clip_path"><strong>set_clip_path</strong></a>(self, path)</dt><dd><tt>Set the artist's clip path<br>
<br>
ACCEPTS: an agg.path_storage instance</tt></dd></dl>
<dl><dt><a name="Quiver-set_contains"><strong>set_contains</strong></a>(self, picker)</dt><dd><tt>Replace the contains test used by this artist. The new picker should<br>
be a callable function which determines whether the artist is hit by the<br>
mouse event:<br>
<br>
hit, props = picker(artist, mouseevent)<br>
<br>
If the mouse event is over the artist, return hit=True and props<br>
is a dictionary of properties you want returned with the contains test.</tt></dd></dl>
<dl><dt><a name="Quiver-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="Quiver-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="Quiver-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="Quiver-set_picker"><strong>set_picker</strong></a>(self, picker)</dt><dd><tt>set the epsilon for picking used by this artist<br>
<br>
picker can be one of the following:<br>
<br>
None - picking is disabled for this artist (default)<br>
<br>
boolean - if True then picking will be enabled and the<br>
artist will fire a pick event if the mouse event is over<br>
the artist<br>
<br>
float - if picker is a number it is interpreted as an<br>
epsilon tolerance in points and the the artist will fire<br>
off an event if it's data is within epsilon of the mouse<br>
event. For some artists like lines and patch collections,<br>
the artist may provide additional data to the pick event<br>
that is generated, eg the indices of the data within<br>
epsilon of the pick event<br>
<br>
function - if picker is callable, it is a user supplied<br>
function which determines whether the artist is hit by the<br>
mouse event.<br>
<br>
hit, props = picker(artist, mouseevent)<br>
<br>
to determine the hit test. if the mouse event is over the<br>
artist, return hit=True and props is a dictionary of<br>
properties you want added to the PickEvent attributes<br>
<br>
ACCEPTS: [None|float|boolean|callable]</tt></dd></dl>
<dl><dt><a name="Quiver-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="Quiver-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="Quiver-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="Quiver-update"><strong>update</strong></a>(self, props)</dt></dl>
<dl><dt><a name="Quiver-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>
<hr>
Methods inherited from <a href="matplotlib.cm.html#ScalarMappable">matplotlib.cm.ScalarMappable</a>:<br>
<dl><dt><a name="Quiver-add_checker"><strong>add_checker</strong></a>(self, checker)</dt><dd><tt>Add an entry to a dictionary of boolean flags<br>
that are set to True when the mappable is changed.</tt></dd></dl>
<dl><dt><a name="Quiver-add_observer"><strong>add_observer</strong></a>(self, mappable)</dt><dd><tt>whenever the norm, clim or cmap is set, call the notify<br>
instance of the mappable observer with self.<br>
<br>
This is designed to allow one image to follow changes in the<br>
cmap of another image</tt></dd></dl>
<dl><dt><a name="Quiver-autoscale"><strong>autoscale</strong></a>(self)</dt><dd><tt>Autoscale the scalar limits on the norm instance using the<br>
current array</tt></dd></dl>
<dl><dt><a name="Quiver-autoscale_None"><strong>autoscale_None</strong></a>(self)</dt><dd><tt>Autoscale the scalar limits on the norm instance using the<br>
current array, changing only limits that are None</tt></dd></dl>
<dl><dt><a name="Quiver-changed"><strong>changed</strong></a>(self)</dt><dd><tt>Call this whenever the mappable is changed so observers can<br>
update state</tt></dd></dl>
<dl><dt><a name="Quiver-check_update"><strong>check_update</strong></a>(self, checker)</dt><dd><tt>If mappable has changed since the last check,<br>
return True; else return False</tt></dd></dl>
<dl><dt><a name="Quiver-get_array"><strong>get_array</strong></a>(self)</dt><dd><tt>Return the array</tt></dd></dl>
<dl><dt><a name="Quiver-get_clim"><strong>get_clim</strong></a>(self)</dt><dd><tt>return the min, max of the color limits for image scaling</tt></dd></dl>
<dl><dt><a name="Quiver-notify"><strong>notify</strong></a>(self, mappable)</dt><dd><tt>If this is called then we are pegged to another mappable.<br>
Update our cmap, norm, alpha from the other mappable.</tt></dd></dl>
<dl><dt><a name="Quiver-set_array"><strong>set_array</strong></a>(self, A)</dt><dd><tt>Set the image array from numpy array A</tt></dd></dl>
<dl><dt><a name="Quiver-set_clim"><strong>set_clim</strong></a>(self, vmin<font color="#909090">=None</font>, vmax<font color="#909090">=None</font>)</dt><dd><tt>set the norm limits for image scaling; if vmin is a length2<br>
sequence, interpret it as (vmin, vmax) which is used to<br>
support setp<br>
<br>
ACCEPTS: a length 2 sequence of floats</tt></dd></dl>
<dl><dt><a name="Quiver-set_cmap"><strong>set_cmap</strong></a>(self, cmap)</dt><dd><tt>set the colormap for luminance data<br>
<br>
ACCEPTS: a colormap</tt></dd></dl>
<dl><dt><a name="Quiver-set_colorbar"><strong>set_colorbar</strong></a>(self, im, ax)</dt><dd><tt>set the colorbar image and axes associated with mappable</tt></dd></dl>
<dl><dt><a name="Quiver-set_norm"><strong>set_norm</strong></a>(self, norm)</dt><dd><tt>set the normalization instance</tt></dd></dl>
<dl><dt><a name="Quiver-to_rgba"><strong>to_rgba</strong></a>(self, x, alpha<font color="#909090">=1.0</font>, bytes<font color="#909090">=False</font>)</dt><dd><tt>Return a normalized rgba array corresponding to x.<br>
If x is already an rgb array, insert alpha; if it is<br>
already rgba, return it unchanged.<br>
If bytes is True, return rgba as 4 uint8s instead of 4 floats.</tt></dd></dl>
</td></tr></table> <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="QuiverKey">class <strong>QuiverKey</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>Labelled arrow for use as a quiver plot scale key.<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="QuiverKey-__init__"><strong>__init__</strong></a>(self, Q, X, Y, U, label, **kw)</dt><dd><tt>Add a key to a quiver plot.<br>
<br>
Function signature:<br>
quiverkey(Q, X, Y, U, label, **kw)<br>
<br>
Arguments:<br>
Q is the <a href="#Quiver">Quiver</a> instance returned by a call to quiver.<br>
X, Y give the location of the key; additional explanation follows.<br>
U is the length of the key<br>
label is a string with the length and units of the key<br>
<br>
Keyword arguments (default given first):<br>
* coordinates = 'axes' | 'figure' | 'data' | 'inches'<br>
Coordinate system and units for X, Y: 'axes' and 'figure'<br>
are normalized coordinate systems with 0,0 in the lower<br>
left and 1,1 in the upper right; 'data' are the axes<br>
data coordinates (used for the locations of the vectors<br>
in the quiver plot itself); 'inches' is position in the<br>
figure in inches, with 0,0 at the lower left corner.<br>
* color overrides face and edge colors from Q.<br>
* labelpos = 'N' | 'S' | 'E' | 'W'<br>
Position the label above, below, to the right, to the left<br>
of the arrow, respectively.<br>
* labelsep = 0.1 inches distance between the arrow and the label<br>
* labelcolor (defaults to default Text color)<br>
* fontproperties is a dictionary with keyword arguments accepted<br>
by the FontProperties initializer: family, style, variant,<br>
size, weight<br>
<br>
Any additional keyword arguments are used to override vector<br>
properties taken from Q.<br>
<br>
The positioning of the key depends on X, Y, coordinates, and<br>
labelpos. If labelpos is 'N' or 'S', X,Y give the position<br>
of the middle of the key arrow. If labelpos is 'E', X,Y<br>
positions the head, and if labelpos is 'W', X,Y positions the<br>
tail; in either of these two cases, X,Y is somewhere in the middle<br>
of the arrow+label key object.</tt></dd></dl>
<dl><dt><a name="QuiverKey-draw"><strong>draw</strong></a>(self, renderer)</dt></dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>halign</strong> = {'E': 'left', 'N': 'center', 'S': 'center', 'W': 'right'}</dl>
<dl><dt><strong>pivot</strong> = {'E': 'tip', 'N': 'mid', 'S': 'mid', 'W': 'tail'}</dl>
<dl><dt><strong>quiverkey_doc</strong> = '<font color="#c040c0">\n</font>Add a key to a quiver plot.<font color="#c040c0">\n\n</font>Function signature...in the middle<font color="#c040c0">\n</font> of the arrow+label key object.<font color="#c040c0">\n</font>'</dl>
<dl><dt><strong>valign</strong> = {'E': 'center', 'N': 'bottom', 'S': 'top', 'W': 'center'}</dl>
<hr>
Methods inherited from <a href="matplotlib.artist.html#Artist">matplotlib.artist.Artist</a>:<br>
<dl><dt><a name="QuiverKey-add_callback"><strong>add_callback</strong></a>(self, func)</dt></dl>
<dl><dt><a name="QuiverKey-contains"><strong>contains</strong></a>(self, mouseevent)</dt><dd><tt>Test whether the artist contains the mouse event.<br>
<br>
Returns the truth value and a dictionary of artist specific details of<br>
selection, such as which points are contained in the pick radius. See<br>
individual artists for details.</tt></dd></dl>
<dl><dt><a name="QuiverKey-convert_xunits"><strong>convert_xunits</strong></a>(self, x)</dt><dd><tt>for artists in an axes, if the xaxis as units support,<br>
convert x using xaxis unit type</tt></dd></dl>
<dl><dt><a name="QuiverKey-convert_yunits"><strong>convert_yunits</strong></a>(self, y)</dt><dd><tt>for artists in an axes, if the yaxis as units support,<br>
convert y using yaxis unit type</tt></dd></dl>
<dl><dt><a name="QuiverKey-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="QuiverKey-get_animated"><strong>get_animated</strong></a>(self)</dt><dd><tt>return the artist's animated state</tt></dd></dl>
<dl><dt><a name="QuiverKey-get_axes"><strong>get_axes</strong></a>(self)</dt><dd><tt>return the axes instance the artist resides in, or None</tt></dd></dl>
<dl><dt><a name="QuiverKey-get_clip_box"><strong>get_clip_box</strong></a>(self)</dt><dd><tt>Return artist clipbox</tt></dd></dl>
<dl><dt><a name="QuiverKey-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="QuiverKey-get_clip_path"><strong>get_clip_path</strong></a>(self)</dt><dd><tt>Return artist clip path</tt></dd></dl>
<dl><dt><a name="QuiverKey-get_contains"><strong>get_contains</strong></a>(self)</dt><dd><tt>return the _contains test used by the artist, or None for default.</tt></dd></dl>
<dl><dt><a name="QuiverKey-get_figure"><strong>get_figure</strong></a>(self)</dt><dd><tt>return the figure instance</tt></dd></dl>
<dl><dt><a name="QuiverKey-get_label"><strong>get_label</strong></a>(self)</dt></dl>
<dl><dt><a name="QuiverKey-get_picker"><strong>get_picker</strong></a>(self)</dt><dd><tt>return the Pickeration instance used by this artist</tt></dd></dl>
<dl><dt><a name="QuiverKey-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="QuiverKey-get_visible"><strong>get_visible</strong></a>(self)</dt><dd><tt>return the artist's visiblity</tt></dd></dl>
<dl><dt><a name="QuiverKey-get_zorder"><strong>get_zorder</strong></a>(self)</dt></dl>
<dl><dt><a name="QuiverKey-have_units"><strong>have_units</strong></a>(self)</dt><dd><tt>return True if units are set on the x or y axes</tt></dd></dl>
<dl><dt><a name="QuiverKey-hitlist"><strong>hitlist</strong></a>(self, event)</dt><dd><tt>List the children of the artist which contain the mouse event</tt></dd></dl>
<dl><dt><a name="QuiverKey-is_figure_set"><strong>is_figure_set</strong></a>(self)</dt></dl>
<dl><dt><a name="QuiverKey-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="QuiverKey-pchanged"><strong>pchanged</strong></a>(self)</dt><dd><tt>fire event when property changed</tt></dd></dl>
<dl><dt><a name="QuiverKey-pick"><strong>pick</strong></a>(self, mouseevent)</dt><dd><tt><a href="#QuiverKey-pick">pick</a>(mouseevent)<br>
<br>
each child artist will fire a pick event if mouseevent is over<br>
the artist and the artist has picker set</tt></dd></dl>
<dl><dt><a name="QuiverKey-pickable"><strong>pickable</strong></a>(self)</dt><dd><tt>return True if self is pickable</tt></dd></dl>
<dl><dt><a name="QuiverKey-remove"><strong>remove</strong></a>(self)</dt><dd><tt>Remove the artist from the figure if possible. The effect will not<br>
be visible until the figure is redrawn, e.g., with ax.draw_idle().<br>
Call ax.relim() to update the axes limits if desired.<br>
<br>
Note: relim() will not see collections even if the collection<br>
was added to axes with autolim=True.<br>
<br>
Note: there is no support for removing the artist's legend entry.</tt></dd></dl>
<dl><dt><a name="QuiverKey-remove_callback"><strong>remove_callback</strong></a>(self, oid)</dt></dl>
<dl><dt><a name="QuiverKey-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="QuiverKey-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="QuiverKey-set_animated"><strong>set_animated</strong></a>(self, b)</dt><dd><tt>set the artist's animation state<br>
<br>
ACCEPTS: [True | False]</tt></dd></dl>
<dl><dt><a name="QuiverKey-set_axes"><strong>set_axes</strong></a>(self, axes)</dt><dd><tt>set the axes instance the artist resides in, if any<br>
<br>
ACCEPTS: an axes instance</tt></dd></dl>
<dl><dt><a name="QuiverKey-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="QuiverKey-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="QuiverKey-set_clip_path"><strong>set_clip_path</strong></a>(self, path)</dt><dd><tt>Set the artist's clip path<br>
<br>
ACCEPTS: an agg.path_storage instance</tt></dd></dl>
<dl><dt><a name="QuiverKey-set_contains"><strong>set_contains</strong></a>(self, picker)</dt><dd><tt>Replace the contains test used by this artist. The new picker should<br>
be a callable function which determines whether the artist is hit by the<br>
mouse event:<br>
<br>
hit, props = picker(artist, mouseevent)<br>
<br>
If the mouse event is over the artist, return hit=True and props<br>
is a dictionary of properties you want returned with the contains test.</tt></dd></dl>
<dl><dt><a name="QuiverKey-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="QuiverKey-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="QuiverKey-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="QuiverKey-set_picker"><strong>set_picker</strong></a>(self, picker)</dt><dd><tt>set the epsilon for picking used by this artist<br>
<br>
picker can be one of the following:<br>
<br>
None - picking is disabled for this artist (default)<br>
<br>
boolean - if True then picking will be enabled and the<br>
artist will fire a pick event if the mouse event is over<br>
the artist<br>
<br>
float - if picker is a number it is interpreted as an<br>
epsilon tolerance in points and the the artist will fire<br>
off an event if it's data is within epsilon of the mouse<br>
event. For some artists like lines and patch collections,<br>
the artist may provide additional data to the pick event<br>
that is generated, eg the indices of the data within<br>
epsilon of the pick event<br>
<br>
function - if picker is callable, it is a user supplied<br>
function which determines whether the artist is hit by the<br>
mouse event.<br>
<br>
hit, props = picker(artist, mouseevent)<br>
<br>
to determine the hit test. if the mouse event is over the<br>
artist, return hit=True and props is a dictionary of<br>
properties you want added to the PickEvent attributes<br>
<br>
ACCEPTS: [None|float|boolean|callable]</tt></dd></dl>
<dl><dt><a name="QuiverKey-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="QuiverKey-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="QuiverKey-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="QuiverKey-update"><strong>update</strong></a>(self, props)</dt></dl>
<dl><dt><a name="QuiverKey-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>
@footer@