/usr/lib64/python2.6/site-packages/matplotlib
NameSizeModeActions
backends/-0755rm
delaunay/-0755rm
mpl-data/-0755rm
numerix/-0755rm
projections/-0755rm
sphinxext/-0755rm
afm.py150890644editdlrm
afm.pyc169590644editdlrm
afm.pyo169590644editdlrm
artist.py356230644editdlrm
artist.pyc403260644editdlrm
artist.pyo403260644editdlrm
axes.py2800890644editdlrm
axes.pyc2493960644editdlrm
axes.pyo2482840644editdlrm
axis.py573540644editdlrm
axis.pyc589730644editdlrm
axis.pyo586660644editdlrm
backend_bases.py723180644editdlrm
backend_bases.pyc779670644editdlrm
backend_bases.pyo778770644editdlrm
bezier.py149170644editdlrm
bezier.pyc135260644editdlrm
bezier.pyo135260644editdlrm
blocking_input.py136900644editdlrm
blocking_input.pyc143460644editdlrm
blocking_input.pyo140280644editdlrm
cbook.py427560644editdlrm
cbook.pyc567550644editdlrm
cbook.pyo565290644editdlrm
cm.py80980644editdlrm
cm.pyc97720644editdlrm
cm.pyo97720644editdlrm
collections.py407840644editdlrm
collections.pyc440060644editdlrm
collections.pyo440060644editdlrm
colorbar.py274560644editdlrm
colorbar.pyc254970644editdlrm
colorbar.pyo254970644editdlrm
colors.py391100644editdlrm
colors.pyc400790644editdlrm
colors.pyo400790644editdlrm
contour.py428950644editdlrm
contour.pyc360990644editdlrm
contour.pyo359370644editdlrm
dates.py360070755editdlrm
dates.pyc400170644editdlrm
dates.pyo399530644editdlrm
dviread.py320330644editdlrm
dviread.pyc346820644editdlrm
dviread.pyo345390644editdlrm
figure.py412640644editdlrm
figure.pyc429390644editdlrm
figure.pyo428080644editdlrm
finance.py205820644editdlrm
finance.pyc185190644editdlrm
finance.pyo183590644editdlrm
fontconfig_pattern.py64290644editdlrm
fontconfig_pattern.pyc65190644editdlrm
fontconfig_pattern.pyo65190644editdlrm
font_manager.py426530644editdlrm
font_manager.pyc404560644editdlrm
font_manager.pyo404560644editdlrm
ft2font.so3061680775editdlrm
hatch.py65640644editdlrm
hatch.pyc91200644editdlrm
hatch.pyo91200644editdlrm
image.py315400644editdlrm
image.pyc330420644editdlrm
image.pyo329960644editdlrm
legend.py323020644editdlrm
legend.pyc235510644editdlrm
legend.pyo233780644editdlrm
lines.py546850644editdlrm
lines.pyc564310644editdlrm
lines.pyo563260644editdlrm
mathtext.py1020090644editdlrm
mathtext.pyc1030670644editdlrm
mathtext.pyo1026790644editdlrm
mlab.py942940644editdlrm
mlab.pyc1000040644editdlrm
mlab.pyo998240644editdlrm
mpl.py7850644editdlrm
mpl.pyc11760644editdlrm
mpl.pyo11760644editdlrm
nxutils.so95120775editdlrm
offsetbox.py298070644editdlrm
offsetbox.pyc338890644editdlrm
offsetbox.pyo338340644editdlrm
patches.py1284850644editdlrm
patches.pyc1301480644editdlrm
patches.pyo1300100644editdlrm
path.py217650644editdlrm
path.pyc211740644editdlrm
path.pyo209540644editdlrm
pylab.py109810644editdlrm
pylab.pyc123990644editdlrm
pylab.pyo123990644editdlrm
pyparsing.py1439240644editdlrm
pyparsing.pyc1467370644editdlrm
pyparsing.pyo1467370644editdlrm
pyplot.py824680644editdlrm
pyplot.pyc802790644editdlrm
pyplot.pyo802790644editdlrm
quiver.py375400644editdlrm
quiver.pyc337880644editdlrm
quiver.pyo337880644editdlrm
rcsetup.py234340644editdlrm
rcsetup.pyc211190644editdlrm
rcsetup.pyo209490644editdlrm
scale.py142330644editdlrm
scale.pyc194740644editdlrm
scale.pyo194740644editdlrm
spines.py126840644editdlrm
spines.pyc116360644editdlrm
spines.pyo112090644editdlrm
table.py168280644editdlrm
table.pyc169310644editdlrm
table.pyo167800644editdlrm
texmanager.py224640644editdlrm
texmanager.pyc199620644editdlrm
texmanager.pyo199620644editdlrm
text.py598220644editdlrm
text.pyc592400644editdlrm
text.pyo592400644editdlrm
ticker.py404280644editdlrm
ticker.pyc504610644editdlrm
ticker.pyo503250644editdlrm
tight_bbox.py36550644editdlrm
tight_bbox.pyc40660644editdlrm
tight_bbox.pyo40660644editdlrm
transforms.py753870644editdlrm
transforms.pyc896110644editdlrm
transforms.pyo887020644editdlrm
ttconv.so653600775editdlrm
type1font.py115370644editdlrm
type1font.pyc112560644editdlrm
type1font.pyo112560644editdlrm
units.py49760644editdlrm
units.pyc57750644editdlrm
units.pyo57750644editdlrm
widgets.py408330644editdlrm
widgets.pyc425680644editdlrm
widgets.pyo423820644editdlrm
windowing.py4540644editdlrm
windowing.pyc12830644editdlrm
windowing.pyo12830644editdlrm
_cm.py3704140644editdlrm
_cm.pyc1030420644editdlrm
_cm.pyo1030420644editdlrm
_cntr.so211840775editdlrm
_delaunay.so611200775editdlrm
_image.so2822480775editdlrm
_mathtext_data.py579900644editdlrm
_mathtext_data.pyc637870644editdlrm
_mathtext_data.pyo637870644editdlrm
_path.so2799920775editdlrm
_png.so1564720775editdlrm
_pylab_helpers.py27150644editdlrm
_pylab_helpers.pyc37080644editdlrm
_pylab_helpers.pyo37080644editdlrm
__init__.py289720644editdlrm
__init__.pyc289800644editdlrm
__init__.pyo289260644editdlrm
Edit: /usr/lib64/python2.6/site-packages/matplotlib/quiver.pyo (33788B)
YJc@s!dZddkZddklZddkiZddkiZddki Z ddk i Z ddk lZddkiZddklZddklZddkZde iZdZd e ifd YZd Zd eifd YZde iZdeifdYZdS(s Support for plotting vector fields. Presently this contains Quiver and Barb. Quiver plots an arrow in the direction of the vector, with the size of the arrow related to the magnitude of the vector. Barbs are like quiver in that they point along a vector, but the magnitude of the vector is given schematically by the presence of barbs or flags on the barb. This will also become a home for things such as standard deviation ellipses, which can and will be derived very easily from the Quiver code. iN(tma(tallow_rasterization(tdelete_masked_points(t CirclePolygons Plot a 2-D field of arrows. call signatures:: quiver(U, V, **kw) quiver(U, V, C, **kw) quiver(X, Y, U, V, **kw) quiver(X, Y, U, V, C, **kw) Arguments: *X*, *Y*: The x and y coordinates of the arrow locations (default is tail of arrow; see *pivot* kwarg) *U*, *V*: give the *x* and *y* components of the arrow vectors *C*: an optional array used to map colors to the arrows All arguments may be 1-D or 2-D arrays or sequences. If *X* and *Y* are absent, they will be generated as a uniform grid. If *U* and *V* are 2-D arrays but *X* and *Y* are 1-D, and if len(*X*) and len(*Y*) match the column and row dimensions of *U*, then *X* and *Y* will be expanded with :func:`numpy.meshgrid`. *U*, *V*, *C* may be masked arrays, but masked *X*, *Y* are not supported at present. Keyword arguments: *units*: ['width' | 'height' | 'dots' | 'inches' | 'x' | 'y' ] arrow units; the arrow dimensions *except for length* are in multiples of this unit. * 'width' or 'height': the width or height of the axes * 'dots' or 'inches': pixels or inches, based on the figure dpi * 'x' or 'y': *X* or *Y* data units The arrows scale differently depending on the units. For 'x' or 'y', the arrows get larger as one zooms in; for other units, the arrow size is independent of the zoom state. For 'width or 'height', the arrow size increases with the width and height of the axes, respectively, when the the window is resized; for 'dots' or 'inches', resizing does not change the arrows. *angles*: ['uv' | 'xy' | array] With the default 'uv', the arrow aspect ratio is 1, so that if *U*==*V* the angle of the arrow on the plot is 45 degrees CCW from the *x*-axis. With 'xy', the arrow points from (x,y) to (x+u, y+v). Alternatively, arbitrary angles may be specified as an array of values in degrees, CCW from the *x*-axis. *scale*: [ None | float ] data units per arrow unit, e.g. m/s per plot width; a smaller scale parameter makes the arrow longer. If *None*, a simple autoscaling algorithm is used, based on the average vector length and the number of vectors. *width*: shaft width in arrow units; default depends on choice of units, above, and number of vectors; a typical starting value is about 0.005 times the width of the plot. *headwidth*: scalar head width as multiple of shaft width, default is 3 *headlength*: scalar head length as multiple of shaft width, default is 5 *headaxislength*: scalar head length at shaft intersection, default is 4.5 *minshaft*: scalar length below which arrow scales, in units of head length. Do not set this to less than 1, or small arrows will look terrible! Default is 1 *minlength*: scalar minimum length as a multiple of shaft width; if an arrow length is less than this, plot a dot (hexagon) of this diameter instead. Default is 1. *pivot*: [ 'tail' | 'middle' | 'tip' ] The part of the arrow that is at the grid point; the arrow rotates about this point, hence the name *pivot*. *color*: [ color | color sequence ] This is a synonym for the :class:`~matplotlib.collections.PolyCollection` facecolor kwarg. If *C* has been set, *color* has no effect. The defaults give a slightly swept-back arrow; to make the head a triangle, make *headaxislength* the same as *headlength*. To make the arrow more pointed, reduce *headwidth* or increase *headlength* and *headaxislength*. To make the head smaller relative to the shaft, scale down all the head parameters. You will probably do best to leave minshaft alone. linewidths and edgecolors can be used to customize the arrow outlines. Additional :class:`~matplotlib.collections.PolyCollection` keyword arguments: %(PolyCollection)s s Add a key to a quiver plot. call signature:: quiverkey(Q, X, Y, U, label, **kw) Arguments: *Q*: The Quiver instance returned by a call to quiver. *X*, *Y*: The location of the key; additional explanation follows. *U*: The length of the key *label*: a string with the length and units of the key Keyword arguments: *coordinates* = [ 'axes' | 'figure' | 'data' | 'inches' ] Coordinate system and units for *X*, *Y*: 'axes' and 'figure' are normalized coordinate systems with 0,0 in the lower left and 1,1 in the upper right; 'data' are the axes data coordinates (used for the locations of the vectors in the quiver plot itself); 'inches' is position in the figure in inches, with 0,0 at the lower left corner. *color*: overrides face and edge colors from *Q*. *labelpos* = [ 'N' | 'S' | 'E' | 'W' ] Position the label above, below, to the right, to the left of the arrow, respectively. *labelsep*: Distance in inches between the arrow and the label. Default is 0.1 *labelcolor*: defaults to default :class:`~matplotlib.text.Text` color. *fontproperties*: A dictionary with keyword arguments accepted by the :class:`~matplotlib.font_manager.FontProperties` initializer: *family*, *style*, *variant*, *size*, *weight* Any additional keyword arguments are used to override vector properties taken from *Q*. The positioning of the key depends on *X*, *Y*, *coordinates*, and *labelpos*. If *labelpos* is 'N' or 'S', *X*, *Y* give the position of the middle of the key arrow. If *labelpos* is 'E', *X*, *Y* positions the head, and if *labelpos* is 'W', *X*, *Y* positions the tail; in either of these two cases, *X*, *Y* is somewhere in the middle of the arrow+label key object. t QuiverKeycBseZdZhdd6dd6dd6dd6Zhdd6d d6dd6dd6Zhd d6d d6d d6d d6Zd Zee_dZdZ dZ e dZ dZ dZdZeZRS(s8 Labelled arrow for use as a quiver plot scale key. tcentertNtStlefttEtrighttWtbottomttoptmidttipttailc stii|_|_|_|_|idd_|idd_ |_ |idd_ i |i ii_fd}|i iiid||idd _|id d_|id t_|_i}tid |d iidiid ti|_idj oiiint _!|i"d_"dS(Nt coordinatestaxestcolortlabelsepg?cs i|i_t_dS(N(t_labelsep_inchestdpiRtFalset _initialized(tfig(tself(s7/usr/lib64/python2.6/site-packages/matplotlib/quiver.pyt on_dpi_changest dpi_changedtlabelposRt labelcolortfontpropertiesttextthorizontalalignmenttverticalalignment(#tmartisttArtistt__init__tQtXtYtUtpoptcoordtNoneRtlabelRtaxtfigureRRt callbackstconnectRRtdictRtkwtmtexttTextthaligntvalignt font_managertFontPropertiesR t set_colorRRtzorder( RR&R'R(R)R-R3Rt_fp((Rs7/usr/lib64/python2.6/site-packages/matplotlib/quiver.pyR%s2        cCs<to1|i|ii}|i|i|i_|ii}ti|i_|iit i |i gt i d|_ ||i_||i_|ii}|i|iti|i d|i|ifgd|i||_|idj o|ii|in|ii|iit|_ndS(Nitoffsetst transOffset(i(tTruet_set_transformR&tpivotRtUmaskRtnomaskt _make_vertstnptarrayR)tzerostvertstpolykwtupdateR3t collectionstPolyCollectionR'R(t get_transformtvectorRR,R:t set_transformR(Rt_pivott_maskR3((s7/usr/lib64/python2.6/site-packages/matplotlib/quiver.pyt_inits(        cCs@|idjo ||iS|idjo ||iS|SdS(NR R (RR(Rtx((s7/usr/lib64/python2.6/site-packages/matplotlib/quiver.pyt_text_xs   cCs@|idjo ||iS|idjo ||iS|SdS(NRR(RR(Rty((s7/usr/lib64/python2.6/site-packages/matplotlib/quiver.pyt_text_ys   cCs|i|ii||ii|i|if\}}|ii|i ||ii |i ||ii|dS(N( RRRNtdrawRMttransform_pointR'R(R tset_xRTtset_yRV(RtrendererRSRU((s7/usr/lib64/python2.6/site-packages/matplotlib/quiver.pyRW"s  'cCs|idjo|i|iiin|idjo|i|iiing|idjo|i|iiiin:|idjo|i|iiiin t ddS(NtdataRR/tinchessunrecognized coordinates( R+ROR&R.t transDatat transAxesR/t transFiguretdpi_scale_transt ValueError(R((s7/usr/lib64/python2.6/site-packages/matplotlib/quiver.pyR@,scCs'tii|||ii|dS(N(R#R$t set_figureR (RR((s7/usr/lib64/python2.6/site-packages/matplotlib/quiver.pyRc8scCsC|ii|dp|ii|do thfSthfS(Ni(R tcontainsRNR?R(Rt mouseevent((s7/usr/lib64/python2.6/site-packages/matplotlib/quiver.pyRd<s (t__name__t __module__t__doc__R6R7RAR%t_quiverkey_docRRRTRVRRWR@RcRdt quiverkey_doc(((s7/usr/lib64/python2.6/site-packages/matplotlib/quiver.pyRs""" $      c Gsdgd\}}}}}t|}t|djpt|djoti|id}nti|id}ti|id}|idjod|id}}n|i\}}t|djog}|D]} |ti| i q~\}}t||joPt||jo=g} ti ||D]} | | i qW~ \}}qnUti ti |ti |} g} | D]} | ti | q~ \}}|||||fS(Niiiiii( R,tlisttlenREt atleast_1dR*tndimtshapeRFtraveltmeshgridtarange( targsR'R(R)tVtCtnrtnct_[1]tat_[2]t indexgridt_[3]((s7/usr/lib64/python2.6/site-packages/matplotlib/quiver.pyt _parse_argsJs  &6&A$0tQuivercBsueZdZdZdee_dZedZd dZ dZ ddZ d Z d Z eZRS( sr Specialized PolyCollection for arrows. The only API method is set_UVC(), which can be used to change the size, orientation, and color of the arrows; their locations are fixed when the class is instantiated. Possibly this method will be useful in animations. Much of the work in this class is done in the draw() method so that as much information as possible is available about the plot. In subsequent draw() calls, recalculation is limited to things that might have changed, so there should be no performance penalty from putting the calculations in the draw() method. c s$|_t|\}}}}}|_|_ti|ddtif|ddtiff_t|_ |i dd_ |i dd_ t|i dd_|i dd_|i dd _|i d d _|i d d _|i d d_|i d d_|i dd_|i dd_|idi|iddtiigdid|idt||_i|||t_ d_!d_"fd} ii#i$i%d| dS(Ntscalet headwidthit headlengthitheadaxislengthg@tminshaftit minlengthtunitstwidthtanglestuvRtkRARt facecolorst linewidthsiR=R>tclosedcst_t_dS(N(R?t_new_UVRR(R(R(s7/usr/lib64/python2.6/site-packages/matplotlib/quiver.pyRs R(i(&R.R}R'R(REthstacktnewaxistXYRlRR*R,RRtfloatRRRRRRRRRAt setdefaultRKRLR%R^RRItset_UVCRtkeyvectkeytextR/R0R1( RR.RsR3R'R(R)RtRuR((Rs7/usr/lib64/python2.6/site-packages/matplotlib/quiver.pyR%ss<   >     s The constructor takes one required argument, an Axes instance, followed by the args and kwargs described by the following pylab interface documentation: %scCsto|i}|i}|ii|ii|iif\}}||_t dt dt i |i }|idjod|i||_qndS(sTinitialization delayed until first draw; allow time for axes setup. iigQ?N(R?R@R.tinvertedRXtbboxRtheighttspantmaxtmintmathtsqrtRR,(RttransR.tsxtsytsn((s7/usr/lib64/python2.6/site-packages/matplotlib/quiver.pyRRs   ! $cCss|i|ip|idjo8|i|i|i}|i|dtt|_nti i ||dS(NtxyR( RRRRRDR)Rtt set_vertsRRKRLRW(RR[RH((s7/usr/lib64/python2.6/site-packages/matplotlib/quiver.pyRWs   cCs:ti|dti}ti|dti}ti|i|idtdt}|dj o{ti|dti}ti||idtdt}|tijo|i }qti |d|dt}n|i d|_ |i d|_ ||_ |dj o|i|nt|_dS(Ntcopytshrinktmaski(Rtmasked_invalidRRptmask_orRR?R,RCtfilledRFR)RtRBt set_arrayR(RR)RtRuR((s7/usr/lib64/python2.6/site-packages/matplotlib/quiver.pyRs$ !  cCs|i}|id joR|idjo|ii}|ii}n|ii}|ii}||}n|idjo|ii}ng|idjo|ii}nG|idjo d}n-|idjo|ii}n tdt i i |}|i ||S( NRSRURRtdotsg?R]sunrecognized units(RSRU( R.RtviewLimRRRR/RRbt transformstAffine2DRRO(RR.tdx0tdx1tdxR((s7/usr/lib64/python2.6/site-packages/matplotlib/quiver.pyR@s(       gMbP?c Cs|iii|i}ti|ddtif|ddtiff}|iii|i||}||}ti|dddf|dddf}|S(Nii(R.R^t transformRRERRtarctan2( RR)RttepsRRtxyptdxytang((s7/usr/lib64/python2.6/site-packages/matplotlib/quiver.pyt_angless ;  2cCs||d}ti|}|idjottdti|i}|it i j o||ii }n |i }d|||i }||_n||i|i }|i|\} } |idjo|i||} nb|idjoti|} n?t i|idtid} | i} | tid9} | idd f| _| | dtid| |i } | ddddtif} ti| i| ifd d } | S( Ny?i g?RRRigf@itaxisi(REtabsoluteRR,RRRRRBRRCtmeanRRt _h_arrowsRRtangleRRRRptpiRotexpRt concatenatetrealtimag(RR)RtRRyRtameanRtlengthR'R(tthetaRR((s7/usr/lib64/python2.6/site-packages/matplotlib/quiver.pyRDs.  ! &"!c Cs[|i|i}t|}|i|d}ti|ddd|tid|i |i dgti}|tiddddg|}dtidd|i dgti}ti |ti ddf|dd}tid||i||i|gti}dtidd|i dgti}dddd ddddg}|i |d} |i |d} | ddd d fcd 9<|i |} |i |} | d d c!d 9+||} | | ti ddf} | | ti ddf} ti ||jd dd}ti | || ti | || |id d jo(| d| ddd ti f8} n9|id d jo$| | ddd ti f} n||ij}|iotidd dtitid}ti||id}ti||id}ti |ti ddf|dd}ti |ti ddf|dd}ti |d d}ti | ||ti | ||n|itij oeti |iddti fd d}ti| d|dt} ti| d|dt} n| | fS(s length is in arrow width units iiiitoutg?NRiiiRRg@RRi(RRRltreshapeREtclipRFRtfloat64RtrepeatRttaketputmaskRARtanyRrRtcostsinRBRRCR(RRtminshRRSRUtx0ty0tiiR'R(tX0tY0Rtshortttooshorttthtx1ty1tX1tY1R((s7/usr/lib64/python2.6/site-packages/matplotlib/quiver.pyR sX #(+(" ($ &+++N(RfRgRhR%t _quiver_docRRRRWR,RR@RRDRt quiver_doc(((s7/usr/lib64/python2.6/site-packages/matplotlib/quiver.pyR~bs -       ;s Plot a 2-D field of barbs. call signatures:: barb(U, V, **kw) barb(U, V, C, **kw) barb(X, Y, U, V, **kw) barb(X, Y, U, V, C, **kw) Arguments: *X*, *Y*: The x and y coordinates of the barb locations (default is head of barb; see *pivot* kwarg) *U*, *V*: give the *x* and *y* components of the barb shaft *C*: an optional array used to map colors to the barbs All arguments may be 1-D or 2-D arrays or sequences. If *X* and *Y* are absent, they will be generated as a uniform grid. If *U* and *V* are 2-D arrays but *X* and *Y* are 1-D, and if len(*X*) and len(*Y*) match the column and row dimensions of *U*, then *X* and *Y* will be expanded with :func:`numpy.meshgrid`. *U*, *V*, *C* may be masked arrays, but masked *X*, *Y* are not supported at present. Keyword arguments: *length*: Length of the barb in points; the other parts of the barb are scaled against this. Default is 9 *pivot*: [ 'tip' | 'middle' ] The part of the arrow that is at the grid point; the arrow rotates about this point, hence the name *pivot*. Default is 'tip' *barbcolor*: [ color | color sequence ] Specifies the color all parts of the barb except any flags. This parameter is analagous to the *edgecolor* parameter for polygons, which can be used instead. However this parameter will override facecolor. *flagcolor*: [ color | color sequence ] Specifies the color of any flags on the barb. This parameter is analagous to the *facecolor* parameter for polygons, which can be used instead. However this parameter will override facecolor. If this is not set (and *C* has not either) then *flagcolor* will be set to match *barbcolor* so that the barb has a uniform color. If *C* has been set, *flagcolor* has no effect. *sizes*: A dictionary of coefficients specifying the ratio of a given feature to the length of the barb. Only those values one wishes to override need to be included. These features include: - 'spacing' - space between features (flags, full/half barbs) - 'height' - height (distance from shaft to top) of a flag or full barb - 'width' - width of a flag, twice the width of a full barb - 'emptybarb' - radius of the circle used for low magnitudes *fill_empty*: A flag on whether the empty barbs (circles) that are drawn should be filled with the flag color. If they are not filled, they will be drawn such that no color is applied to the center. Default is False *rounding*: A flag to indicate whether the vector magnitude should be rounded when allocating barb components. If True, the magnitude is rounded to the nearest multiple of the half-barb increment. If False, the magnitude is simply truncated to the next lowest multiple. Default is True *barb_increments*: A dictionary of increments specifying values to associate with different parts of the barb. Only those values one wishes to override need to be included. - 'half' - half barbs (Default is 5) - 'full' - full barbs (Default is 10) - 'flag' - flags (default is 50) *flip_barb*: Either a single boolean flag or an array of booleans. Single boolean indicates whether the lines and flags should point opposite to normal for all barbs. An array (which should be the same size as the other data arrays) indicates whether to flip for each individual barb. Normal behavior is for the barbs and lines to point right (comes from wind barbs having these features point towards low pressure in the Northern Hemisphere.) Default is False Barbs are traditionally used in meteorology as a way to plot the speed and direction of wind observations, but can technically be used to plot any two dimensional vector quantity. As opposed to arrows, which give vector magnitude by the length of the arrow, the barbs give more quantitative information about the vector magnitude by putting slanted lines or a triangle for various increments in magnitude, as show schematically below:: : /\ \ : / \ \ : / \ \ \ : / \ \ \ : ------------------------------ .. note the double \ at the end of each line to make the figure .. render correctly The largest increment is given by a triangle (or "flag"). After those come full lines (barbs). The smallest increment is a half line. There is only, of course, ever at most 1 half line. If the magnitude is small and only needs a single half-line and no full lines or triangles, the half-line is offset from the end of the barb so that it can be easily distinguished from barbs with a single full line. The magnitude for the barb shown above would nominally be 65, using the standard increments of 50, 10, and 5. linewidths and edgecolors can be used to customize the barb. Additional :class:`~matplotlib.collections.PolyCollection` keyword arguments: %(PolyCollection)s tBarbscBsoeZdZdZdee_eddddZdZd dZ d Z e i i ie _eZ RS( s> Specialized PolyCollection for barbs. The only API method is :meth:`set_UVC`, which can be used to change the size, orientation, and color of the arrows. Locations are changed using the :meth:`set_offsets` collection method. Possibly this method will be useful in animations. There is one internal function :meth:`_find_tails` which finds exactly what should be put on the barb given the vector magnitude. From there :meth:`_make_barbs` is used to find the vertices of the polygon to represent the barb based on this information. c Os|idd|_|idd|_|idd}|idd}|idt|_|idt|_|id t|_|id t |_ |id t|_ d||fjoHd |d <|o||d(R*RPt_lengthR,R2RRRRR?RtflipRR}RSRURERRRKRLR%R^RORtIdentityTransformR( RR.RsR3RRRSRUtutvtcRt barb_size((s7/usr/lib64/python2.6/site-packages/matplotlib/quiver.pyR%s6     ; s The constructor takes one required argument, an Axes instance, followed by the args and kwargs described by the following pylab interface documentation: %sii i2c Cs|o"|||diti}nti||iti}ti||}ti||iti}ti||}||j}||djB|djB} |||| fS(sX Find how many of each of the tail pieces is necessary. Flag specifies the increment for a flag, barb for a full barb, and half for half a barb. Mag should be the magnitude of a vector (ie. >= 0). This returns a tuple of: (*number of flags*, *number of barbs*, *half_flag*, *empty_flag*) *half_flag* is a boolean whether half of a barb is needed, since there should only ever be one half on a given barb. *empty_flag* flag is an array of flags to easily tell if a barb is empty (too low to plot any barbs/flags. g?i(tastypeREtinttfloortmod( RtmagRthalftfulltflagt num_flagstnum_barbt half_flagt empty_flag((s7/usr/lib64/python2.6/site-packages/matplotlib/quiver.pyt _find_tailss" c  Cs|| idd} || idd} || idd}|| idd}td d d | d }| o | } nd }||i}ti||tid  }tdd|i}| o |}n#ti ||dddf}g}xti |D]\}}||o|i |qn||fg}|}xt ||D]w}||jo|| d 7}n|i |||g|| ||d |g||||gg||| 8}qjWxbt ||D]P}|i |||f|| |||d f|||fg|| 8}qW||o~||jo)|i |||f|d| 8}n|i |||f|| d |||df|||fgntii| i|}|i |qW|S(sv This function actually creates the wind barbs. *u* and *v* are components of the vector in the *x* and *y* directions, respectively. *nflags*, *nbarbs*, and *half_barb*, empty_flag* are, *respectively, the number of flags, number of barbs, flag for *half a barb, and flag for empty barb, ostensibly obtained *from :meth:`_find_tails`. *length* is the length of the barb staff in points. *pivot* specifies the point on the barb around which the entire barb should be rotated. Right now, valid options are 'head' and 'middle'. *sizes* is a dictionary of coefficients specifying the ratio of a given feature to the length of the barb. These features include: - *spacing*: space between features (flags, full/half barbs) - *height*: distance from shaft of top of a flag or full barb - *width* - width of a flag, twice the width of a full barb - *emptybarb* - radius of the circle used for low magnitudes *fill_empty* specifies whether the circle representing an empty barb should be filled or not (this changes the drawing of the polygon). *flip* is a flag indicating whether the features should be flipped to the other side of the barb (useful for winds in the southern hemisphere. This function returns list of arrays of vertices, defining a polygon for each of the wind barbs. These polygons have been rotated to properly align with the vector direction. tspacingg?Rg?Rg?t emptybarbg333333?Rgtmiddleg@iitradiusNig?i(ii(tgetR2tlowerRRRERRt get_vertsRt ndenumeratetappendtrangetextendRRtrotateR(RRRtnflagstnbarbst half_barbRRRARRRRt full_heightt full_widtht empty_radt pivot_pointstendxtendyRtcirct empty_barbt barb_listtindexRt poly_vertstoffsetti((s7/usr/lib64/python2.6/site-packages/matplotlib/quiver.pyt _make_barbs2s^0  "       c Csti|dti|_ti|dti|_|dj o^ti|dti}t|ii|i i|i|i|\}}}}}n:t|ii|i i|i|i\}}}}t i ||||} |i | |i |i\} } } } |i||| | | | |i|i|i|i|i }|i||dj o|i|nt i|ddt if|ddt iff}||_dS(NR(RRRRpRRR,RRSRURERRRRRRRPRRRRRRRt_offsets(RR)RtRuRRSRURRt magnitudetflagstbarbsthalvestemptyt plot_barbsR((s7/usr/lib64/python2.6/site-packages/matplotlib/quiver.pyRs$ ( $  ;cCs|dddf|_|dddf|_t|ii|ii|i|i\}}}}ti|ddtif|ddtiff}t i i ||dS(s Set the offsets for the barb polygons. This saves the offets passed in and actually sets version masked as appropriate for the existing U/V data. *offsets* should be a sequence. ACCEPTS: sequence of pairs of floats Nii( RSRURRpRRRERRRKRLt set_offsets(RRRSRURR((s7/usr/lib64/python2.6/site-packages/matplotlib/quiver.pyR!s !;N(RfRgRhR%t _barbs_docR?RRR,RR!RKRLt barbs_doc(((s7/usr/lib64/python2.6/site-packages/matplotlib/quiver.pyRs  .   ( RhtnumpyRERtmatplotlib.collectionsRKtmatplotlib.transformsRtmatplotlib.textR R4tmatplotlib.artisttartistR#Rtmatplotlib.font_managerR8tmatplotlib.cbookRtmatplotlib.patchesRRtkwdocdRRiR$RR}RLR~R"R(((s7/usr/lib64/python2.6/site-packages/matplotlib/quiver.pyts&  r =| n