sJc"@ skddklZlZddkZddkZddkZddkZddkZddkZ ddkl Z ddk Z e i Z ddk iZddk lZddkiZddkiZddkiZddkiZddkiZddki Z!ddk"i#Z#ddk$i%Z&ddk'i(Z)ddk*i+Z,ddk-i.Z.ddk/i0Z1ddk2i3Z4ddk5i6Z7ddk8i9Z:ddk;i<Z=ddk>i?Z@ddkAiBZCddkDiEZFeiGZGeiHZHeiIZIdZJdZKdfdYZLd eiMfd YZNd fd YZOhZPeQd ZReRZSeiTeNeiUd |o|ii|}n|o|ii|}qqnti |}ti |}|i d|i djot dn|i djp|i djot dn|i djo|ddti f}n|i djo|ddti f}n||fS(NR$is&x and y must have same first dimensionis"x and y can be no greater than 2-Di(R%R5RR6t update_unitsR&tconvert_xunitstconvert_yunitstnpt atleast_1dtshapeR tndimtnewaxis(R(txR"tbxtby((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt _xy_from_xys&&  cC s_|i}d|jo|i|dRIRLRXR]ReRtR:(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyRys      $  %tAxescB seZdZdZeiZeiZdZe e e e de e dZ dZ dZ dZdZd d Zd Zd Zd d ZdZdZdZedZddZdZdZdZdZdZe dddZdZ dZ!e"e!Z#dZ$dZ%d Z&e d!Z'd"Z(e e d#Z)d$Z*d%Z+d&Z,d'Z-d(Z.d)Z/e d*Z0d+Z1d,Z2d-Z!d.Z3d/Z4d0Z5d1Z6d2Z7d3Z8d4Z9d5Z:d6Z;d7Z<d8Z=e d9Z>d:Z?d;Z@d<ZAd=ZBd>ZCd?ZDe e d@ZEdAZFdBZGe e e dCZHdDZIdEZJdFZKdGZLdHZMdIZNdJZOdKZPdLZQee e dMZReSe edNZTdOZUdPZVdQZWdRZXdSZYdTZZdUZ[dVZ\e dWZ]ei^e]ie_i`e]_dXZadYZbdZZcd[Zdd\Zed]Zfd^Zgd_Zhe e d`ZidaZje e e dbZkdcZlddZmei^emihdeingZoepiqD]Zreoeserq8[odf6epitiudg6em_edhZvediZwdjZxdkZyedlZze edmZ{ei^e{ie_i`e{_dnZ|doZ}dpZ~e e dqZdrZe e e dsZdtZduZei^eihdeingZepiqD]ZreeserqS[df6epitiudg6e_edvZedwZdxZdyZedzZe ed{Zei^eie_i`e_e d|Ze d}Zd~ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZe e dZdZe dZei^eie_i`e_dZe e dZei^eie_i`e_dZe e dZei^eie_i`e_e edZei^eie_i`e_dZei^eie_i`e_ddddZei^eie_i`e_ddddZei^eie_i`e_dddZei^eie_i`e_dddZei^eie_i`e_ddddZei^eie_ddddZei^eie_i`e_dZei^eie_i`e_de e edZei^eie_i`e_dZei^eie_i`e_dZei^eie_i`e_dZei^eie_i`e_dZei^eie_i`e_e eie ddZei^eie_i`e_dZdZdZdZde e e e e e e ddded Zei^eie_i`e_de dZei^eie_i`e_dZei^eie_i`e_ddddZe e e e deddZe e de e deeeeed Zei^eie_i`e_dddde e dZddde e e e de e e d Zei^eie_i`e_e de dde e e e e de deie edZei^eie_i`e_dZei^eie_i`e_dZeiie_dZeiie_dZei^eiheiid6e_dZei^eie_i`e_de dZei^eie_i`e_de dZei^eie_i`e_e e e e de e e e e dde e e dZei^eie_i`e_dZdZei^eie_i`e_dZei^eie_i`e_dZdZeiie_dZeiie_dZeiiie_dZei^eie_i`e_dZdZdZdZde ee ee ddde ed Zei^eie_i`e_dddeieide de d ZeZeie_i`eiei`ei^eded|i6|ii>|i6|i?i@|iAi@dS(sClear the current axest xlim_changedt ylim_changedtemittlinearRJs axes.gridtsizesaxes.titlesizegg@gR@RUg?R"g?ttextRtfontpropertiestverticalalignmentRthorizontalalignmentRRiN(RRgrqDZ?(BR5RR6Rt iteritemsRdtignore_existing_data_limitstcbooktCallbackRegistryRRRtmajortminortget_xlimtset_xlimtFalset set_scalet get_scaleRtget_ylimtset_ylimt _autoscaleXont _autoscaleYonRRt _get_linest_get_patches_for_fillRt_gridOnRtpatchesttextsttablestartiststimagestlegend_t collectionsRt font_managertFontPropertiesRRRRttitleOffsetTranstmtexttTextttitleRRt set_clip_boxRRtpatcht axesPatchRt set_facecolorRt set_edgecolort set_linewidthtaxisont set_clip_pathRtcleanR(R(tnametspinetx0tx1ty0ty1tprops((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyR)sv                       cC stddS(Ns.Axes.frame was removed in favor of Axes.spines(R(R(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt get_frame~scC s|idS(sclear the axesN(R(R(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytclearscC s|ii|dS(s Set the color cycle for any future plot commands on this Axes. clist is a list of mpl color specifiers. N(RR0(R(R((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyR0scC s|iS(s"return the HOLD status of the axes(R(R(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytisholdscC s+|djo|i |_n ||_dS(s0 call signature:: hold(b=None) Set the hold state. If *hold* is *None* (default), toggle the *hold* state. Else set the *hold* state to boolean value *b*. Examples: * toggle hold: >>> hold() * turn hold on: >>> hold(True) * turn hold off >>> hold(False) When hold is True, subsequent plot commands will be added to the current axes. When hold is False, the current axes and figure will be cleared on the next plot command N(RR(R(R((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytholds cC s|iS(N(t_aspect(R(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt get_aspectscC s|djo d|_n*|djo d|_nt||_|dj o|i|n|dj o|i|ndS(s *aspect* ======== ================================================ value description ======== ================================================ 'auto' automatic; fill position rectangle with data 'normal' same as 'auto'; deprecated 'equal' same scaling from data to plot units for x and y num a circle will be stretched such that the height is num times the width. aspect=1 is the same as aspect='equal'. ======== ================================================ *adjustable* ========= ============================ value description ========= ============================ 'box' change physical size of axes 'datalim' change xlim or ylim ========= ============================ *anchor* ===== ===================== value description ===== ===================== 'C' centered 'SW' lower left corner 'S' middle of bottom edge 'SE' lower right corner etc. ===== ===================== tnormalRtequalN(REsauto(RCRjRtset_adjustableR(R(taspectt adjustabletanchor((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyRs%      cC s|iS(N(R(R(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytget_adjustablescC sk|djoN||ijp||ijo!|djotdqNn||_n tddS(s0 ACCEPTS: [ 'box' | 'datalim' ] RRs,adjustable must be "datalim" for shared axess$argument must be "box", or "datalim"N(sboxsdatalim(RRR R(R(RI((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyRGs    cC s|iS(N(t_anchor(R(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt get_anchorscC sb|tiiijpt|djo ||_n&tdditiiidS(su *anchor* ===== ============ value description ===== ============ 'C' Center 'SW' bottom left 'S' bottom 'SE' bottom right 'E' right 'NE' top right 'N' top 'NW' top left 'W' left ===== ============ isargument must be among %ss, N( RRtcoefstkeysR,RLR RtBBox(R(RJ((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyRs, cC sd|i\}}|i\}}tti||d}tti||d}||S(s Returns the aspect ratio of the raw data. This method is intended to be overridden by new projection types. gKH9(t get_xboundt get_yboundRmtmathtfabs(R(txmintxmaxtymintymaxtxsizetysize((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytget_data_ratios cC s|i\}}|i\}}ttiti|ti|d}ttiti|ti|d}||S(s Returns the aspect ratio of the raw data in log scale. Will be used when both axis scales are in log. gKH9(RQRRRmRSRTtlog10(R(RURVRWRXRYRZ((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytget_data_ratio_log s ..c0C s|djo|idt}n|i}|i|i}}|djo|djo d}n|djo|djo d}ng|djo |djp|djo?|djo2|dj o!tid||fd}qn|djo|i|dddS|d jo d }n|}||i jp||i jo.|i d jod |_ tid qn|i i \}}||} |i d joy|djo||i} n||i} |i} | i| | | } |i| i|i| ddS|i|dd|i\} }|i\}}|djoBti| ti|} }ti|ti|}}ntti|| d}tti||d}|i\}}}}| ||} | |}|||d}t|djodS|djoe|i}ti|iti|i}ti|iti|i }d|}d|}n$|i}d|i!}d|i"}||}||}||} ||}!|!|}"| |}#d}$d}%||i jo ||i j}&||i jo ||i j}'|&o|'otiddS|&o t#}(nk||$joD||%jo7|#djo |djp|"djo |dj})n |dj})|'p|)}(|(omd||}*|*| d}+|*| d},|djo|i$d|+d|,fq|i$|+|,fnjd| |}-|-|!d}.|-|!d}/|djo|i%d|.d|/fn|i%|.|/fdS(sp Use :meth:`_aspect` and :meth:`_adjustable` to modify the axes box or the view limits. RR tlogRs:aspect is not supported for Axes with xscale=%s, yscale=%sRRNRFiRRs7shared axes: "adjustable" is being changed to "datalim"gKH9g?g{Gzt?g?is9adjustable='datalim' cannot work with shared x and y axesg?g@g$@(&RRRdRDt get_xscalet get_yscaletwarningstwarnRRRRt get_figuretget_size_inchesR]R[Rtshrunk_to_aspecttanchoredRMRQRRRSR\RmRTR~tabsRR;R:R=R<twidththeightRt set_yboundt set_xbound(0R(tpositionRHRRtaspect_scale_modetAtfigWtfigHt fig_aspectt box_aspecttpbtpb1RURVRWRXRYRZtlRtwtht data_ratiot y_expandertdLtdL_widtht dL_heighttxrtyrtxmargtymargtYsizetXsizetXmargtYmargtxmtymtchangextchangeytadjust_ytadjytycR<R=txcR:R;((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt apply_aspect.s             " #   ""                c O st|djot|do|di}|djo|in1|djo|in|djo|it|id |i|djo|idd d q|djo*|idd d dd|it q|djo!|idt|it q|d jo:|idt|it |idd d ddqnt d||i \}}|i \}}||||fSy |dWnt j o|idt}|idd}|idd}|i|||\}}|idd}|idd}|i|||\}}||||fSX|d}t|djot dn|i|d|dg|i|d|dg|S(s Convenience method for manipulating the x and y view limits and the aspect ratio of the plot. *kwargs* are passed on to :meth:`set_xlim` and :meth:`set_ylim` iitontoffRFttighttscaledRERtimageRIRRRJRs-Unrecognized string %s to axis; try on or offR RURVRWRXis$v must contain [xmin xmax ymin ymax]ii(sequalstightRsnormalsautoRN(R,Rgtlowert set_axis_ont set_axis_offtset_autoscale_onRdRtautoscale_viewRR RRt IndexErrorRkRRR( R(RpR<tsRURVRWRXR ((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytaxissX$           !   cC stddS(s[ Return a list of artists the axes contains. .. deprecated:: 0.98 sUse get_children insteadN(tDeprecationWarning(R(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytget_child_artistsscC stidt|iS(sReturn the axes Rectangle framesuse ax.patch instead(RaRbRR0(R(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyR?scC s|iS(sBReturn the legend.Legend instance, or None if no legend is defined(R'(R(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt get_legendscC stid|iS(s2return a list of Axes images contained by the Axest AxesImage(Rt silent_listR&(R(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt get_images scC stid|iS(s,Return a list of lines contained by the AxesRZ(RRR(R(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt get_linesscC s|iS(sReturn the XAxis instance(R5(R(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt get_xaxisscC stid|iiS(s2Get the x grid lines as a list of Line2D instancessLine2D xgridline(RRR5t get_gridlines(R(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytget_xgridlinesscC stid|iiS(s1Get the xtick lines as a list of Line2D instancessText xtickline(RRR5t get_ticklines(R(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytget_xticklinesscC s|iS(sReturn the YAxis instance(R6(R(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt get_yaxis scC stid|iiS(s2Get the y grid lines as a list of Line2D instancessLine2D ygridline(RRR6R(R(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytget_ygridlines$scC stid|iiS(s1Get the ytick lines as a list of Line2D instancessLine2D ytickline(RRR6R(R(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytget_yticklines(scC s:t|it|it|it|idjS(sReturn *True* if any artists have been added to axes. This should not be used to determine whether the *dataLim* need to be updated, and may not actually be useful for anything. i(R,R(R&RR"(R(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pythas_data.s &c sP|iii|i||iifd|_|S(sf Add any :class:`~matplotlib.artist.Artist` to the axes. Returns the artist. c sii|S((R%tremove(Rw(R((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytEs(RR%RnRR6R0t_remove_method(R(R((R(s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt add_artist;s   c s|i}|p|idtinii|i||idjo|ii n|o;|i o-t|i oi |i i qnfd|_|S(s Add a :class:`~matplotlib.collections.Collection` instance to the axes. Returns the collection. s collection%dc sii|S((R(R(Rw(R((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyR[sN(t get_labelRR,R(RnRt get_clip_pathRR6R0t_pathstupdate_datalimt get_datalimRR(R(t collectiontautolimR((R(s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytadd_collectionHs  !c si||idjo|iini||ip|idti ni i |fd|_ |S(sv Add a :class:`~matplotlib.lines.Line2D` to the list of plot lines Returns the line. s_line%dc sii|S((RR(Rw(R((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyRmsN( RRRR6R0t_update_line_limitsRRR,RRnR(R(RD((R(s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytadd_line^s   cC sX|i}|iidjo5|ii||id|id|it|_ndS(Nitupdatextupdatey( tget_pathtverticesR Rtupdate_from_pathRtx_isdataty_isdataR(R(RDtp((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyRps    c sgi||idjo|iini|ii|fd|_|S(s Add a :class:`~matplotlib.patches.Patch` *p* to the list of axes patches; the clipbox will be set to the Axes clipping box. If the transform is not set, it will be set to :attr:`transData`. Returns the patch. c sii|S((R"R(Rw(R((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyRsN( RRRR6R0t_update_patch_limitsR"RnR(R(R((R(s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt add_patchxs  cC st|tio+|idjp|idjodS|ii}|idjoz|ii |}|i |i jo,|i |i i }|i |}n|i |d|id|indS(s$update the data limits for patch *p*iNRR(RRaRt get_widtht get_heightRRR tget_patch_transformt transformtget_data_transformRtinvertedRRR(R(R0RtxysR((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyRs& c sCi|ii||iifd|_|S(s Add a :class:`~matplotlib.tables.Table` instance to the list of axes tables Returns the table. c sii|S((R$R(Rw(R((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyRs(RR$RnR6R0R(R(ttab((R(s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt add_tables  cC s_|iitt|_x|iD]}|i|q#Wx|iD]}|i|qDWdS(s2recompute the data limits based on current artistsN(RtignoreRdRRRR"R(R(RDR((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyRs   cC srt|ot| odSti|pti|}n|ii||id|d|t |_dS(s@Update the data lim bbox with seq of xy tups or equiv. 2-D arrayNRR( titerableR,Rt isMaskedArrayRPtasarrayRtupdate_from_data_xyRR(R(RRR((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyRs cC sFt|ot| odS|ii|||it|_dS(s,Update the data lim bbox with seq of xy tupsN(RR,Rtupdate_from_dataRR(R(RUR"((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytupdate_datalim_numerixscC s)|iitii|i|gdS(so Update the datalim to include the given :class:`~matplotlib.transforms.Bbox` *bounds* N(RRRRtunion(R(R~((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytupdate_datalim_boundsscC sd|idjp|idjodS|dj o(|iip|ii|qZn|dj o(|iip|ii|qn|dj o|id|ii}||iijo5|ii||dj o|ii|qn|id|ii}||iijo5|ii||dj o|ii|q\q`ndS(sAlook for unit *kwargs* and update the axis instances as necessaryNR3R4(R5RR6t have_unitsRMR7R8R9(R(txdatatydataR<R3R4((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt_process_unit_infos&      cC s|ii|dS(sd return *True* if the given *mouseevent* (in display coords) is in the Axes i(R0tcontains(R(t mouseevent((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytin_axesscC s|io|iS(sS Get whether autoscaling is applied for both axes on plot commands (RR(R(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytget_autoscale_onscC s|iS(sT Get whether autoscaling for the x-axis is applied on plot commands (R(R(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytget_autoscalex_on scC s|iS(sT Get whether autoscaling for the y-axis is applied on plot commands (R(R(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytget_autoscaley_onscC s||_||_dS(sl Set whether autoscaling is applied on plot commands accepts: [ *True* | *False* ] N(RR(R(R((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyRs cC s ||_dS(s{ Set whether autoscaling for the x-axis is applied on plot commands accepts: [ *True* | *False* ] N(R(R(R((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytset_autoscalex_onscC s ||_dS(s{ Set whether autoscaling for the y-axis is applied on plot commands accepts: [ *True* | *False* ] N(R(R(R((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytset_autoscaley_on'scC s ||_dS(sI Set zorder value below which artists will be rasterized N(R(R(tz((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytset_rasterization_zorder/scC s|iS(sI Get zorder value below which artists will be rasterized (R(R(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytget_rasterization_zorder5scC s|oe|io[|ii|}g}|D]}||iq.~}tii|}|i\} } n|oe|io[|i i|} g} | D]}| |iq~ }tii|}|i \} }n|pBt |i djo{t |i djoet |idjoO|o|io|i| | n|o|io|i| |ndS|o6|io,|iii| | }|i|n|o6|io,|iii| |}|i|ndS(s  autoscale the view limits using the data limits. You can selectively autoscale only a single axis, eg, the xaxis by setting *scaley* to *False*. The autoscaling preserves any axis direction reversal that has already been done. iN(RRt get_siblingsRRRRt intervalxRRt intervalyR,R&RR"RkRjR5tget_major_locatort view_limitsR6(R(RtscalextscaleytxsharedRtaxtdltbbR:R;tysharedt_[2]R<R=tXLtYL((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyR<s0$$cC s|djo |i}n|djotdn|ipdS|id|i}|o |||}|i|n |ig}|i|i|i|i |i|i |i|i |i|i |i os| ok|io$|iid|iidn!|iid|iid|i|i|ign|p|i|in|i|i|idj o|i|in|i o$|io|i|iing}t|D]0\}}|ip||i||fqq~} | i|i} t| djo| dd| joz|ig} | D]"} | d| jo | | q}q}~ } g}| D]"} | d| jo || qq~} ng} |i o|io|i i!|nt|i"djp |i#o%xD|i"D]}|i!|q=Wn#|i$}g}|i"D]0}|io||i%|ddfqrqr~}|i&i'\} }}}|t(|dt(| d}|t(|dt(|d}t)i*|||}t+|_,|i&i-\} }}}|i.t(| t(|||i&|i i/|i i0| o5x$| D]\}}}|i!|qW|i1nx$| D]\}}}|i!|qW|i2d||_dS(s*Draw everything (plot lines, axes, labels)sNo renderer definedNR%g?g@ii(3RRt RuntimeErrort get_visiblet open_groupRRtextendR(R"RR#R%R5RR5t set_zorderR6RnR.R$R'RRt itervaluest enumeratet get_animatedtzordertsortRR,tstart_rasterizingR0tdrawR&toption_image_nocompositetget_image_magnificationt make_imageRtextentstroundtmimaget from_imagesRt is_grayscaleR~t draw_imageRRtstop_rasterizingt close_group(R(trenderertinframeRRR%RtiRtdsutrasterization_zorderRRutdsu_rasterizedt_[3]timtmagt_[4]timsRR ttRhRiRvRwR((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyR`s        -  ( 6:#  @""     cC s+|idj pt|i|idS(s This method can only be used after an initial draw which caches the renderer. It is used to efficiently update Axes data (axis ticks, labels, etc are not updated) N(RRR?R(R(R((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt draw_artistscC s1|idj pt|i|idtdS(s This method can only be used after an initial draw which caches the renderer. It is used to efficiently update Axes data (axis ticks, labels, etc are not updated) R N(RRR?RRd(R(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytredraw_in_framescC s|iS(N(R(R(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytget_renderer_cachescC s|idjotdng}|iiD]}||i|fq4~}|i|i}|ix!|D]\}}|i|qwWdS(NsYou must first call ax.draw()( t _lastRendererRRtanimatedRORRtblitR(R(RRR R ttmp((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt__draw_animates3    cC s|iS(s? Get whether the axes rectangle patch is drawn (R(R(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt get_frame_onscC s ||_dS(sf Set whether the axes rectangle patch is drawn ACCEPTS: [ *True* | *False* ] N(R(R(R((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt set_frame_onscC s|iS(s7 Get whether axis below is true or not (R(R(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt get_axisbelowscC s ||_dS(s Set whether the axis ticks and gridlines are above or below most artists ACCEPTS: [ *True* | *False* ] N(R(R(R((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt set_axisbelowscK sAt|o t}n|ii|||ii||dS(s call signature:: grid(self, b=None, **kwargs) Set the axes grids on or off; *b* is a boolean If *b* is *None* and ``len(kwargs)==0``, toggle the grid state. If *kwargs* are supplied, it is assumed that you want a grid and *b* is thus set to *True* *kawrgs* are used to set the grid line properties, eg:: ax.grid(color='r', linestyle='-', linewidth=2) Valid :class:`~matplotlib.lines.Line2D` kwargs are %(Line2D)s N(R,RdR5RR6(R(RR<((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyR s c K s+|iddi}|idd}|dj oHy|\}}||dWqttfj otdqXn|iddi}|d d jo t}n^|djo0t}|d jo t}qt}td n!|djo d}n td y|dj ol|djp |djo|ii i i |n|djp |djo|i i i i |qn|dj ol|djp |djo|ii i i |n|djp |djo|i i i i |qnWntj otdnXdS(sN Convenience method for manipulating the ScalarFormatter used by default for linear axes. Optional keyword arguments: ============ ===================================== Keyword Description ============ ===================================== *style* [ 'sci' (or 'scientific') | 'plain' ] plain turns off scientific notation *scilimits* (m, n), pair of integers; if *style* is 'sci', scientific notation will be used for numbers outside the range 10`-m`:sup: to 10`n`:sup:. Use (0,0) to include all numbers. *axis* [ 'x' | 'y' | 'both' ] ============ ===================================== Only the major ticks are affected. If the method is called when the :class:`~matplotlib.ticker.ScalarFormatter` is not the :class:`~matplotlib.ticker.Formatter` being used, an :exc:`AttributeError` will be raised. tstyleRt scilimitsis*scilimits must be a sequence of 2 integersRRitscitplaintcommascomma style remains to be addeds%s is not a valid style valueRUR"s0This method only works with the ScalarFormatter.N(R%R&(R7RRR RBRdRtNotImplementedErrorR5Rt formattertset_scientificR6tset_powerlimitsR( R(R<R"R#R!tnRtsbtcb((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytticklabel_format#sD            "cC s t|_dS(sturn off the axisN(RR5(R(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyRcscC s t|_dS(sturn on the axisN(RdR5(R(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyRgscC s|iS(s Return the axis background color(R(R(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytget_axis_bgcolorkscC s||_|ii|dS(s set the axes background color ACCEPTS: any matplotlib color - see :func:`~matplotlib.pyplot.colors` N(RR0R2(R(R((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytset_axis_bgcoloros cC s&|i\}}|i||dS(sInvert the x-axis.N(RR(R(RR((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt invert_xaxis|scC s|i\}}||jS(s'Returns True if the x-axis is inverted.(R(R(RR((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytxaxis_invertedscC s8|i\}}||jo ||fS||fSdS(sa Returns the x-axis numerical bounds where:: lowerBound < upperBound N(R(R(RR((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyRQs  cC s|djot|o|\}}n|i\}}|djo |}n|djo |}n|io5||jo|i||q|i||n2||jo|i||n|i||dS(s Set the lower and upper numerical bounds of the x-axis. This method will honor axes inversion regardless of parameter order. N(RRRQR2R(R(Rtuppert old_lowert old_upper((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyRks     cC st|iiS(s7 Get the x-axis range [*xmin*, *xmax*] (R|RR(R(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyRscK s|djot|o|\}}n|id||f|dj o|i|}n|dj o|i|}n|i\}}|djo |}n|djo |}nti||dt\}}|ii ||\}}||f|i _ |o|i i d|x|ii|D]j}||j oW|i|i i dt|i|ijo'|iidj o|iiiqq8q8Wn||fS(s| call signature:: set_xlim(self, *args, **kwargs) Set the limits for the xaxis Returns the current xlimits as a length 2 tuple: [*xmin*, *xmax*] Examples:: set_xlim((valmin, valmax)) set_xlim(valmin, valmax) set_xlim(xmin=1) # xmax unchanged set_xlim(xmax=1) # xmin unchanged Keyword arguments: *ymin*: scalar the min of the ylim *ymax*: scalar the max of the ylim *emit*: [ True | False ] notify observers of lim change ACCEPTS: len(2) sequence of floats Rt increasingRR N(RRRRNRRt nonsingularRR5tlimit_range_for_scaleRRRtprocessRRRRtcanvast draw_idle(R(RURVR R<told_xmintold_xmaxtother((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyRs2      cC s$dditi|iiS(Ns!return the xaxis scale string: %ss, (RRRR5R(R(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyR_scK s+|ii|||i|idS(s call signature:: set_xscale(value) Set the scaling of the x-axis: %(scale)s ACCEPTS: [%(scale)s] Different kwargs are accepted, depending on the scale: %(scale_docs)s N(R5RRR(R(tvalueR<((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyRs  s | Rt scale_docscC s|iid|S(s)Return the x ticks as a list of locationsR(R5t get_ticklocs(R(R((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt get_xticksscC s|ii|d|S(s[ Set the x ticks with list of *ticks* ACCEPTS: sequence of floats R(R5t set_ticks(R(tticksR((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt set_xticks scC stid|iiS(s0Get the xtick labels as a list of Text instancessText xticklabel(RRR5tget_majorticklabels(R(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytget_xmajorticklabelss cC stid|iiS(s0Get the xtick labels as a list of Text instancessText xticklabel(RRR5tget_minorticklabels(R(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytget_xminorticklabelss cC stid|iid|S(s0Get the xtick labels as a list of Text instancessText xticklabelR(RRR5tget_ticklabels(R(R((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytget_xticklabelss cK s|ii||d||S(so call signature:: set_xticklabels(labels, fontdict=None, minor=False, **kwargs) Set the xtick labels with list of strings *labels*. Return a list of axis text instances. *kwargs* set the :class:`~matplotlib.text.Text` properties. Valid properties are %(Text)s ACCEPTS: sequence of strings R(R5tset_ticklabels(R(tlabelstfontdictRR<((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytset_xticklabels!scC s&|i\}}|i||dS(sInvert the y-axis.N(RR(R(RR((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt invert_yaxis5scC s|i\}}||jS(s'Returns True if the y-axis is inverted.(R(R(RR((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytyaxis_inverted:scC s8|i\}}||jo ||fS||fSdS(sEReturn y-axis numerical bounds in the form of lowerBound < upperBoundN(R(R(RR((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyRR?s  cC s|djot|o|\}}n|i\}}|djo |}n|djo |}n|io5||jo|i||q|i||n2||jo|i||n|i||dS(sSet the lower and upper numerical bounds of the y-axis. This method will honor axes inversion regardless of parameter order. N(RRRRRQR(R(RR3R4R5((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyRjGs     cC st|iiS(s7 Get the y-axis range [*ymin*, *ymax*] (R|RR(R(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyR^scK s|djot|o|\}}n|dj o|i|}n|dj o|i|}n|i\}}|djo |}n|djo |}nti||dt\}}|ii||\}}||f|i _ |o|i i d|x|i i|D]j}||j oW|i|i i dt|i|ijo'|iidj o|iiiqq"q"Wn||fS(sk call signature:: set_ylim(self, *args, **kwargs): Set the limits for the yaxis; v = [ymin, ymax]:: set_ylim((valmin, valmax)) set_ylim(valmin, valmax) set_ylim(ymin=1) # ymax unchanged set_ylim(ymax=1) # ymin unchanged Keyword arguments: *ymin*: scalar the min of the ylim *ymax*: scalar the max of the ylim *emit*: [ True | False ] notify observers of lim change Returns the current ylimits as a length 2 tuple ACCEPTS: len(2) sequence of floats R6RR N(RRRORRR7RR6R8RRRR9RRRRR:R;(R(RWRXR R<told_ymintold_ymaxR>((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyRds0      cC s$dditi|iiS(Ns!return the xaxis scale string: %ss, (RRRR6R(R(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyR`scK s+|ii|||i|idS(s call signature:: set_yscale(value) Set the scaling of the y-axis: %(scale)s ACCEPTS: [%(scale)s] Different kwargs are accepted, depending on the scale: %(scale_docs)s N(R6RRR(R(R?R<((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyRs  cC s|iid|S(s)Return the y ticks as a list of locationsR(R6RA(R(R((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt get_yticksscC s|ii|d|S(s Set the y ticks with list of *ticks* ACCEPTS: sequence of floats Keyword arguments: *minor*: [ False | True ] Sets the minor ticks if True R(R6RC(R(RDR((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt set_ytickss cC stid|iiS(s0Get the xtick labels as a list of Text instancessText yticklabel(RRR6RF(R(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytget_ymajorticklabelss cC stid|iiS(s0Get the xtick labels as a list of Text instancessText yticklabel(RRR6RH(R(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytget_yminorticklabelss cC stid|iid|S(s0Get the xtick labels as a list of Text instancessText yticklabelR(RRR6RJ(R(R((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytget_yticklabelss cK s|ii||d||S(s call signature:: set_yticklabels(labels, fontdict=None, minor=False, **kwargs) Set the ytick labels with list of strings *labels*. Return a list of :class:`~matplotlib.text.Text` instances. *kwargs* set :class:`~matplotlib.text.Text` properties for the labels. Valid properties are %(Text)s ACCEPTS: sequence of strings R(R6RL(R(RMRNRR<((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytset_yticklabelssc C so|ii\}}|djotii}}|tidd}|id||f|i||g\}}||f|i_||f|i_n|i i }t |t i p#t i|}|i i|n|iiddjot|ii|i_n|i|i i}t |t ip&t i||}|i i|ndS(sSets up x-axis ticks and labels that treat the x data as dates. *tz* is the time zone to use in labeling dates. Defaults to rc value. gtdaysi RiN(RRtdatetimetdatettodayt timedeltaRRNRR5RRtmdatest DateLocatortAutoDateLocatortset_major_locatorR|trefreshtget_major_formattert DateFormattertAutoDateFormattertset_major_formatter( R(ttzRURVtdmaxR]tdminRR(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt xaxis_dates&  c C so|ii\}}|djotii}}|tidd}|id||f|i||g\}}||f|i_||f|i_n|i i }t |t i p#t i|}|i i|n|iiddjot|ii|i_n|i|ii}t |t ip&t i||}|i i|ndS(sSets up y-axis ticks and labels that treat the y data as dates. *tz* is the time zone to use in labeling dates. Defaults to rc value. gRZi RiN(RRR[R\R]R^RRORR6RRR_R`RaRbR|RcR5RdReRfRg( R(RhRWRXRiR]RjRR(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt yaxis_date s&  cC sJy|i|SWn2tj o&|iii}||}|SXdS(s Return *x* string formatted. This function will use the attribute self.fmt_xdata if it is callable, else will fall back on the xaxis major formatter N(RRBR5Rdtformat_data_short(R(RURHRF((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt format_xdata1 s  cC sJy|i|SWn2tj o&|iii}||}|SXdS(s Return y string formatted. This function will use the :attr:`fmt_ydata` attribute if it is callable, else will fall back on the yaxis major formatter N(RRBR6RdRm(R(R"RHRF((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt format_ydata= s  cC sZ|djo d}n|i|}|djo d}n|i|}d||fS(s4return a format string formatting the *x*, *y* coords???s x=%s y=%sN(RRnRo(R(RUR"txstys((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt format_coordI s    cC stS(sA Return *True* if this axes support the zoom box (Rd(R(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytcan_zoomW scC s|iS(sF Get whether the axes responds to navigation commands (t _navigate(R(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt get_navigate] scC s ||_dS(sq Set whether the axes responds to navigation toolbar commands ACCEPTS: [ True | False ] N(Rt(R(R((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyRc scC s|iS(sR Get the navigation toolbar button status: 'PAN', 'ZOOM', or None (t_navigate_mode(R(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytget_navigate_modek scC s ||_dS(s Set the navigation toolbar button status; .. warning:: this is not a user-API function. N(Rv(R(R((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyRq sc C satid|iid|iid|iiid|iid|d||_dS(s0 Called when a pan operation has started. *x*, *y* are the mouse coordinates in display coords. button is the mouse button number: * 1: LEFT * 2: MIDDLE * 3: RIGHT .. note:: Intended to be overridden by new projection types. tlimttranst trans_inverseRRUR"N(RtBunchRRRRRt _pan_start(R(RUR"tbutton((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt start_pan{ s cC s |`dS(s Called when a pan operation completes (when the mouse button is up.) .. note:: Intended to be overridden by new projection types. N(R|(R(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytend_pan scC sd}|i}||i}||i}|djo|djodS|djo?||||\}}|ii| | i|i} n |djoy| t|ii}| t|ii }||||\}}|i djod||}|}nt i d||f} t i |i|ig} |ii|i} | | | | } ti| i|i} Wqtj otid dSXn|i| i|i| idS( s^ Called when the mouse moves during a pan operation. *button* is the mouse button number: * 1: LEFT * 2: MIDDLE * 3: RIGHT *key* is a "shift" key *x*, *y* are the mouse coordinates in display coords. .. note:: Intended to be overridden by new projection types. cS s"|djo-t|t|jo |}q|}n|djo d}n|djo d}n|djodt|t|jo d}qdt|t|jo d}qt|t|jo|t|t|}q|t|t|}n||fS(NtcontrolRUiR"tshifti(Rg(REtdxtdy((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt format_deltas s"          iNiiRg?g$@sOverflow while panning(R|RUR"Rt translatedt transformedRzRjRhRiRDRPtpowertarrayRxRyRRt OverflowErrorRaRbRRRR(R(R}RERUR"RRRRtresulttalphatstartt oldpointst newpoints((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytdrag_pan s:         cC s|iS(s return the cursor propertiess as a (*linewidth*, *color*) tuple, where *linewidth* is a float and *color* is an RGBA tuple (t _cursorProps(R(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytget_cursor_props scG s{t|djo|d\}}n0t|djo|\}}n tdtii|}||f|_dS(s Set the cursor property as:: ax.set_cursor_props(linewidth, color) or:: ax.set_cursor_props((linewidth, color)) ACCEPTS: a (*float*, *color*) tuple iiis'args must be a (linewidth, color) tupleN(R,R RRtto_rgbaR(R(R;tlwR((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyR s  cC stddS(s Register observers to be notified when certain events occur. Register with callback functions with the following signatures. The function has the following signature:: func(ax) # where ax is the instance making the callback. The following events can be connected to: 'xlim_changed','ylim_changed' The connection id is is returned - you can use this with disconnect to disconnect from the axes event s3use the callbacks CallbackRegistry instance insteadN(R(R(RRH((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyR scC stddS(sdisconnect from the Axes event.s3use the callbacks CallbackRegistry instance insteadN(R(R(tcid((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt disconnect scC sg}|i|i|i|i|i|i|i|i|i|i|i|i|i|i|i|i |i dj o|i|i n|i|i |i|i |i|i|i|ii|S(sreturn a list of child artistsN(RnR5R6RRR"R#R$R%R&R'RR(R.R0RR(R(tchildren((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt get_children s cC s1t|io|i||S|ii|S(sSTest whether the mouse event occured in the axes. Returns T/F, {} (tcallablet _containsR0R(R(R((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyR) scC s|ii|S(s Returns True if the point (tuple of x,y) is inside the axes (the area defined by the its patch). A pixel coordinate is required. (R0tcontains_point(R(tpoint((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyR2 scG s>t|djotdntii||ddS(s call signature:: pick(mouseevent) each child artist will fire a pick event if mouseevent is over the artist and the artist has picker set isCNew pick API implemented -- see API_CHANGES in the src distributioniN(R,RRRtpick(R(R;((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyR; s c  so|dj o|i||fn ||fd}dfd}|i|i|i}t|ott|}nt|oct g}|D]} || dfq~} g} |D]} | | jo | | qq~ }n|djon t dt |pdSg} |D]} | || | fq7~ }|i |ddS(s3 Return the artist under point that is closest to the *x*, *y*. If *trans* is *None*, *x*, and *y* are in window coords, (0,0 = lower left). Otherwise, *trans* is a :class:`~matplotlib.transforms.Transform` that specifies the coordinate system of *x*, *y*. The selection of artists from amongst which the pick function finds an artist can be narrowed using the optional keyword argument *among*. If provided, this should be either a sequence of permitted artists or a function taking an artist as its argument and returning a true value if and only if that artist can be selected. Note this algorithm calculates distance to the vertices of the polygon, so if you want to pick a patch, click on the edge! cS s9|\}}|\}}ti||d||dS(s&return the distance between two pointsi(RStsqrt(tp1tp2R;R=tx2ty2((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt dist_pointsa s  cS s3|\}}tti||d||dS(s@*x* and *y* are arrays; return the distance to the closest pointi(tminRPR(RRUR"R;R=((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytdist_x_yg s c  sCt|toq|i}|i\}}}}||f|||f||||f|||ff}t|\}}nt|to7|i} |ii| } t| \}}nZt|t i oF|i dt } |i dt } |ii| | \}}nti|ti|S(Ntorig(RR-RR~RhtPatchRRttransform_pathR RZt get_xdataRt get_ydatat numerix_x_yRPR( RRRuRRvRwtvertstxttyttpathttvertsRR(txywinR(s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytdistl s : "is"among must be callable or iterableiN( Rttransform_pointRR"R#RtfilterttestRtdictR R,R(R(RUR"RytamongRRR%RR#tamongdRRRtds((RRs5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt__pickI s(      -6   - cC s |iiS(s, Get the title text string. (R.tget_text(R(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt get_title scK swhtdd6dd6dd6}|ii||ii||dj o|ii|n|ii||iS(sD call signature:: set_title(label, fontdict=None, **kwargs): Set the title for the axes. kwargs are Text properties: %(Text)s ACCEPTS: str .. seealso:: :meth:`text` for information on how override and the optional args work saxes.titlesizetfontsizeRRRRN(RR.tset_texttupdateR(R(RRNR<tdefault((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt set_title s   cC s|ii}|iS(s- Get the xlabel text string. (R5RR(R(R((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt get_xlabel scK s3|dj o||i_n|ii|||S(s call signature:: set_xlabel(xlabel, fontdict=None, labelpad=None, **kwargs) Set the label for the xaxis. *labelpad* is the spacing in points between the label and the x-axis Valid kwargs are Text properties: %(Text)s ACCEPTS: str .. seealso:: :meth:`text` for information on how override and the optional args work N(RR5tlabelpadtset_label_text(R(txlabelRNRR<((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt set_xlabel s cC s|ii}|iS(s- Get the ylabel text string. (R6RR(R(R((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt get_ylabel scK s3|dj o||i_n|ii|||S(s call signature:: set_ylabel(ylabel, fontdict=None, labelpad=None, **kwargs) Set the label for the yaxis *labelpad* is the spacing in points between the label and the y-axis Valid kwargs are Text properties: %(Text)s ACCEPTS: str .. seealso:: :meth:`text` for information on how override and the optional args work N(RR6RR(R(tylabelRNRR<((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt set_ylabel s c  shdd6dd6id6}|o"tid|d|d|}ntid|d|d|}i||i||d j o|i|n|i|ii|fd |_ d |jo|i i n|S( s call signature:: text(x, y, s, fontdict=None, **kwargs) Add text in string *s* to axis at location *x*, *y*, data coordinates. Keyword arguments: *fontdict*: A dictionary to override the default text properties. If *fontdict* is *None*, the defaults are determined by your rc parameters. *withdash*: [ False | True ] Creates a :class:`~matplotlib.text.TextWithDash` instance instead of a :class:`~matplotlib.text.Text` instance. Individual keyword arguments can be used to override any given parameter:: text(x, y, s, fontsize=12) The default transform specifies that text is in data coords, alternatively, you can specify text in axis coords (0,0 is lower-left and 1,1 is upper-right). The example below places text in the center of the axes:: text(0.5, 0.5,'matplotlib', horizontalalignment='center', verticalalignment='center', transform = ax.transAxes) You can put a rectangular box around the text instance (eg. to set a background color) by using the keyword *bbox*. *bbox* is a dictionary of :class:`matplotlib.patches.Rectangle` properties. For example:: text(x, y, s, bbox=dict(facecolor='red', alpha=0.5)) Valid kwargs are :class:`matplotlib.text.Text` properties: %(Text)s RRRRRRUR"R c sii|S((R#R(Rw(R((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyR9 stclip_onN( RR,t TextWithDashR-RRRR#RnRR/R( R(RUR"RRNtwithdashR<RR((R(s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyR  s&/        cO sjti||}|iti|i||ido|i|in|i i ||S(s call signature:: annotate(s, xy, xytext=None, xycoords='data', textcoords='data', arrowprops=None, **kwargs) Keyword arguments: %(Annotation)s .. plot:: mpl_examples/pylab_examples/annotation_demo2.py R( R,t AnnotationRRRRthas_keyR6R0R#Rn(R(R;R<R((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytannotateA s  iic K s|i\}}|id|d||i|}||jp ||j}ti|i|i} ti||g||gd| |} t | _ |i | |i dt d|| S(s call signature:: axhline(y=0, xmin=0, xmax=1, **kwargs) Axis Horizontal Line Draw a horizontal line at *y* from *xmin* to *xmax*. With the default values of *xmin* = 0 and *xmax* = 1, this line will always span the horizontal extent of the axes, regardless of the xlim settings, even if you change them, eg. with the :meth:`set_xlim` command. That is, the horizontal extent is in axes coords: 0=left, 0.5=middle, 1.0=right but the *y* location is in data coordinates. Return value is the :class:`~matplotlib.lines.Line2D` instance. kwargs are the same as kwargs to plot, and can be used to control the line properties. Eg., * draw a thick red hline at *y* = 0 that spans the xrange >>> axhline(linewidth=4, color='r') * draw a default hline at *y* = 1 that spans the xrange >>> axhline(y=1) * draw a default hline at *y* = .5 that spans the the middle half of the xrange >>> axhline(y=.5, xmin=0.25, xmax=0.75) Valid kwargs are :class:`~matplotlib.lines.Line2D` properties: %(Line2D)s .. seealso:: :meth:`axhspan` for example plot and source code RR<RRR( RRRRORRRRR RZRRRR( R(R"RURVR<RWRXtyyRRyRu((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytaxhlineX s+'  c K s|i\}}|id|d||i|}||jp ||j}ti|i|i} ti||g||gd| |} t | _ |i | |i d|dt | S(s call signature:: axvline(x=0, ymin=0, ymax=1, **kwargs) Axis Vertical Line Draw a vertical line at *x* from *ymin* to *ymax*. With the default values of *ymin* = 0 and *ymax* = 1, this line will always span the vertical extent of the axes, regardless of the ylim settings, even if you change them, eg. with the :meth:`set_ylim` command. That is, the vertical extent is in axes coords: 0=bottom, 0.5=middle, 1.0=top but the *x* location is in data coordinates. Return value is the :class:`~matplotlib.lines.Line2D` instance. kwargs are the same as kwargs to plot, and can be used to control the line properties. Eg., * draw a thick red vline at *x* = 0 that spans the yrange >>> axvline(linewidth=4, color='r') * draw a default vline at *x* = 1 that spans the yrange >>> axvline(x=1) * draw a default vline at *x* = .5 that spans the the middle half of the yrange >>> axvline(x=.5, ymin=0.25, ymax=0.75) Valid kwargs are :class:`~matplotlib.lines.Line2D` properties: %(Line2D)s .. seealso:: :meth:`axhspan` for example plot and source code RR<RRR( RQRRNRRRRR RZRRRR( R(RURWRXR<RURVtxxRRyRu((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytaxvline s+'  c K sti|i|i}|i||g||gd||i||g\}}|i||g\}}||f||f||f||ff}ti||}|i |t |_ |i ||i dt |S(sF call signature:: axhspan(ymin, ymax, xmin=0, xmax=1, **kwargs) Axis Horizontal Span. *y* coords are in data units and *x* coords are in axes (relative 0-1) units. Draw a horizontal span (rectangle) from *ymin* to *ymax*. With the default values of *xmin* = 0 and *xmax* = 1, this always spans the xrange, regardless of the xlim settings, even if you change them, eg. with the :meth:`set_xlim` command. That is, the horizontal extent is in axes coords: 0=left, 0.5=middle, 1.0=right but the *y* location is in data coordinates. Return value is a :class:`matplotlib.patches.Polygon` instance. Examples: * draw a gray rectangle from *y* = 0.25-0.75 that spans the horizontal extent of the axes >>> axhspan(0.25, 0.75, facecolor='0.5', alpha=0.5) Valid kwargs are :class:`~matplotlib.patches.Polygon` properties: %(Polygon)s **Example:** .. plot:: mpl_examples/pylab_examples/axhspan_demo.py R<R(RRRRRRNRORaRbRRRRR( R(RWRXRURVR<RyRR((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytaxhspan s&"*   c K sti|i|i}|i||g||gd||i||g\}}|i||g\}}||f||f||f||fg}ti||}|i |t |_ |i ||i dt |S(sZ call signature:: axvspan(xmin, xmax, ymin=0, ymax=1, **kwargs) Axis Vertical Span. *x* coords are in data units and *y* coords are in axes (relative 0-1) units. Draw a vertical span (rectangle) from *xmin* to *xmax*. With the default values of *ymin* = 0 and *ymax* = 1, this always spans the yrange, regardless of the ylim settings, even if you change them, eg. with the :meth:`set_ylim` command. That is, the vertical extent is in axes coords: 0=bottom, 0.5=middle, 1.0=top but the *y* location is in data coordinates. Return value is the :class:`matplotlib.patches.Polygon` instance. Examples: * draw a vertical green translucent rectangle from x=1.25 to 1.55 that spans the yrange of the axes >>> axvspan(1.25, 1.55, facecolor='g', alpha=0.5) Valid kwargs are :class:`~matplotlib.patches.Polygon` properties: %(Polygon)s .. seealso:: :meth:`axhspan` for example plot and source code R<R(RRRRRRNRORaRbRRRRR( R(RURVRWRXR<RyRR((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytaxvspan s&"*   R#tsolidc K s|idd j otdn|i||g|d||i|}|i|}|i|}t|p |g}nt|p |g}nt|p |g}nti|}ti|}ti|}t |djoti ||i }nt |djoti ||i }nt |t |jo t dnt |t |jo t dng}t |||D](\} } } || | f| | ffq~} ti| d|d|d |} |i| | i|t|i|i}t|i|i}|i}|i}||f||ff}|i||i| S( s call signature:: hlines(y, xmin, xmax, colors='k', linestyles='solid', **kwargs) Plot horizontal lines at each *y* from *xmin* to *xmax*. Returns the :class:`~matplotlib.collections.LineCollection` that was added. Required arguments: *y*: a 1-D numpy array or iterable. *xmin* and *xmax*: can be scalars or ``len(x)`` numpy arrays. If they are scalars, then the respective values are constant, else the widths of the lines are determined by *xmin* and *xmax*. Optional keyword arguments: *colors*: a line collections color argument, either a single color or a ``len(y)`` list of colors *linestyles*: [ 'solid' | 'dashed' | 'dashdot' | 'dotted' ] **Example:** .. plot:: mpl_examples/pylab_examples/hline_demo.py Rs^hlines now uses a collections.LineCollection and not a list of Line2D to draw; see API_CHANGESR<is&xmin and y are unequal sized sequencess&xmax and y are unequal sized sequencesRt linestylesRN(RkRRRRORNRRPRR,tresizeRRR RhtmcolltLineCollectionRRRRmRR(R(R"RURVRRRR<RtthisxmintthisxmaxtthisyRtcolltminxtmaxxtminytmaxytcorners((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pythlinesE sJ#     A      c K s|idd j otdn|id|d||gd||i|}|i|}|i|}t|p |g}nt|p |g}nt|p |g}nti|}ti|}ti|}t |djoti ||i }nt |djoti ||i }nt |t |jo t dnt |t |jo t dnti ||gi}g} t||D]+\} \} } | | | f| | ffq~ } ti| d |d |d |}|i||i|t|}t|}tt|t|}tt|t|}||f||ff}|i||i|S( s  call signature:: vlines(x, ymin, ymax, color='k', linestyles='solid') Plot vertical lines at each *x* from *ymin* to *ymax*. *ymin* or *ymax* can be scalars or len(*x*) numpy arrays. If they are scalars, then the respective values are constant, else the heights of the lines are determined by *ymin* and *ymax*. *colors* a line collections color args, either a single color or a len(*x*) list of colors *linestyles* one of [ 'solid' | 'dashed' | 'dashdot' | 'dotted' ] Returns the :class:`matplotlib.collections.LineCollection` that was added. kwargs are :class:`~matplotlib.collections.LineCollection` properties: %(LineCollection)s Rs^vlines now uses a collections.LineCollection and not a list of Line2D to draw; see API_CHANGESRRR<is&ymin and x are unequal sized sequencess&ymax and x are unequal sized sequencesRRRN(RkRRRRNRORRPRR,RRRR RtTRhRRRRRRmRR(R(RURWRXRRRR<tYRtthisxtthisymintthisymaxRRRRRRR((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytvlines sL"     A      cO s|idt}|idt}|ip|ing}x4|i||D] }|i||i|qUW|id|d||S(s Plot lines and/or markers to the :class:`~matplotlib.axes.Axes`. *args* is a variable length argument, allowing for multiple *x*, *y* pairs with an optional format string. For example, each of the following is legal:: plot(x, y) # plot x and y using default line style and color plot(x, y, 'bo') # plot x and y using blue circle markers plot(y) # plot y using x as index array 0..N-1 plot(y, 'r+') # ditto, but with red plusses If *x* and/or *y* is 2-dimensional, then the corresponding columns will be plotted. An arbitrary number of *x*, *y*, *fmt* groups can be specified, as in:: a.plot(x1, y1, 'g^', x2, y2, 'g-') Return value is a list of lines that were added. The following format string characters are accepted to control the line style or marker: ================ =============================== character description ================ =============================== ``'-'`` solid line style ``'--'`` dashed line style ``'-.'`` dash-dot line style ``':'`` dotted line style ``'.'`` point marker ``','`` pixel marker ``'o'`` circle marker ``'v'`` triangle_down marker ``'^'`` triangle_up marker ``'<'`` triangle_left marker ``'>'`` triangle_right marker ``'1'`` tri_down marker ``'2'`` tri_up marker ``'3'`` tri_left marker ``'4'`` tri_right marker ``'s'`` square marker ``'p'`` pentagon marker ``'*'`` star marker ``'h'`` hexagon1 marker ``'H'`` hexagon2 marker ``'+'`` plus marker ``'x'`` x marker ``'D'`` diamond marker ``'d'`` thin_diamond marker ``'|'`` vline marker ``'_'`` hline marker ================ =============================== The following color abbreviations are supported: ========== ======== character color ========== ======== 'b' blue 'g' green 'r' red 'c' cyan 'm' magenta 'y' yellow 'k' black 'w' white ========== ======== In addition, you can specify colors in many weird and wonderful ways, including full names (``'green'``), hex strings (``'#008000'``), RGB or RGBA tuples (``(0,1,0,1)``) or grayscale intensities as a string (``'0.8'``). Of these, the string specifications can be used in place of a ``fmt`` group, but the tuple forms can be used only as ``kwargs``. Line styles and colors are combined in a single format string, as in ``'bo'`` for blue circles. The *kwargs* can be used to set line properties (any property that has a ``set_*`` method). You can use this to set a line label (for auto legends), linewidth, anitialising, marker face color, etc. Here is an example:: plot([1,2,3], [1,2,3], 'go-', label='line 1', linewidth=2) plot([1,2,3], [1,4,9], 'rs', label='line 2') axis([0, 4, 0, 10]) legend() If you make multiple lines with one plot command, the kwargs apply to all those lines, e.g.:: plot(x1, y1, x2, y2, antialised=False) Neither line will be antialiased. You do not need to use format strings, which are just abbreviations. All of the line properties can be controlled by keyword arguments. For example, you can set the color, marker, linestyle, and markercolor with:: plot(x, y, color='green', linestyle='dashed', marker='o', markerfacecolor='blue', markersize=12). See :class:`~matplotlib.lines.Line2D` for details. The kwargs are :class:`~matplotlib.lines.Line2D` properties: %(Line2D)s kwargs *scalex* and *scaley*, if defined, are passed on to :meth:`~matplotlib.axes.Axes.autoscale_view` to determine whether the *x* and *y* axes are autoscaled; the default is *True*. RR(R7RdRRRRRnR(R(R;R<RRRRD((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyR$ sv  tboc K sn|ip|in|i||||}|o|i|n|o|i|n|i|S(sH call signature:: plot_date(x, y, fmt='bo', tz=None, xdate=True, ydate=False, **kwargs) Similar to the :func:`~matplotlib.pyplot.plot` command, except the *x* or *y* (or both) data is considered to be dates, and the axis is labeled accordingly. *x* and/or *y* can be a sequence of dates represented as float days since 0001-01-01 UTC. Keyword arguments: *fmt*: string The plot format string. *tz*: [ None | timezone string ] The time zone to use in labeling dates. If *None*, defaults to rc value. *xdate*: [ True | False ] If *True*, the *x*-axis will be labeled with dates. *ydate*: [ False | True ] If *True*, the *y*-axis will be labeled with dates. Note if you are using custom date tickers and formatters, it may be necessary to set the formatters/locators after the call to :meth:`plot_date` since :meth:`plot_date` will set the default tick locator to :class:`matplotlib.dates.AutoDateLocator` (if the tick locator is not already set to a :class:`matplotlib.dates.DateLocator` instance) and the default tick formatter to :class:`matplotlib.dates.AutoDateFormatter` (if the tick formatter is not already set to a :class:`matplotlib.dates.DateFormatter` instance). Valid kwargs are :class:`~matplotlib.lines.Line2D` properties: %(Line2D)s .. seealso:: :mod:`~matplotlib.dates` for helper functions :func:`~matplotlib.dates.date2num`, :func:`~matplotlib.dates.num2date` and :func:`~matplotlib.dates.drange` for help on creating the required floating point dates. (RRR$RkRlR( R(RUR"RRhtxdatetydateR<R=((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt plot_dater s9  cO s|ip|inh|iddd6|idd d6|iddd6}h|iddd6|idd d6|iddd6}|id ||id ||i}t|_|i||}||_|S( s call signature:: loglog(*args, **kwargs) Make a plot with log scaling on the *x* and *y* axis. :func:`~matplotlib.pyplot.loglog` supports all the keyword arguments of :func:`~matplotlib.pyplot.plot` and :meth:`matplotlib.axes.Axes.set_xscale` / :meth:`matplotlib.axes.Axes.set_yscale`. Notable keyword arguments: *basex*/*basey*: scalar > 1 base of the *x*/*y* logarithm *subsx*/*subsy*: [ None | sequence ] the location of the minor *x*/*y* ticks; *None* defaults to autosubs, which depend on the number of decades in the plot; see :meth:`matplotlib.axes.Axes.set_xscale` / :meth:`matplotlib.axes.Axes.set_yscale` for details *nonposx*/*nonposy*: ['mask' | 'clip' ] non-positive values in *x* or *y* can be masked as invalid, or clipped to a very small positive number The remaining valid kwargs are :class:`~matplotlib.lines.Line2D` properties: %(Line2D)s **Example:** .. plot:: mpl_examples/pylab_examples/log_demo.py tbasexi tsubsxtnonposxtmasktbaseytsubsytnonposyR^N(RRR7RRRRdR$(R(R;R<RRRRu((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytloglog s&    cO s|ip|inh|iddd6|iddd6|iddd6}|id||id|i}t|_|i||}||_|S( s call signature:: semilogx(*args, **kwargs) Make a plot with log scaling on the *x* axis. :func:`semilogx` supports all the keyword arguments of :func:`~matplotlib.pyplot.plot` and :meth:`matplotlib.axes.Axes.set_xscale`. Notable keyword arguments: *basex*: scalar > 1 base of the *x* logarithm *subsx*: [ None | sequence ] The location of the minor xticks; *None* defaults to autosubs, which depend on the number of decades in the plot; see :meth:`~matplotlib.axes.Axes.set_xscale` for details. *nonposx*: ['mask' | 'clip' ] non-positive values in *x* can be masked as invalid, or clipped to a very small positive number The remaining valid kwargs are :class:`~matplotlib.lines.Line2D` properties: %(Line2D)s .. seealso:: :meth:`loglog` For example code and figure Ri RRRR^R N(RRR7RRRRdR$(R(R;R<tdRRu((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytsemilogx s%     cO s|ip|inh|iddd6|iddd6|iddd6}|id||id|i}t|_|i||}||_|S( s call signature:: semilogy(*args, **kwargs) Make a plot with log scaling on the *y* axis. :func:`semilogy` supports all the keyword arguments of :func:`~matplotlib.pylab.plot` and :meth:`matplotlib.axes.Axes.set_yscale`. Notable keyword arguments: *basey*: scalar > 1 Base of the *y* logarithm *subsy*: [ None | sequence ] The location of the minor yticks; *None* defaults to autosubs, which depend on the number of decades in the plot; see :meth:`~matplotlib.axes.Axes.set_yscale` for details. *nonposy*: ['mask' | 'clip' ] non-positive values in *y* can be masked as invalid, or clipped to a very small positive number The remaining valid kwargs are :class:`~matplotlib.lines.Line2D` properties: %(Line2D)s .. seealso:: :meth:`loglog` For example code and figure Ri RRRR^R N(RRR7RRRRdR$(R(R;R<RRRu((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytsemilogy*s%     cK s|i|||S(s call signature:: acorr(x, normed=True, detrend=mlab.detrend_none, usevlines=True, maxlags=10, **kwargs) Plot the autocorrelation of *x*. If *normed* = *True*, normalize the data by the autocorrelation at 0-th lag. *x* is detrended by the *detrend* callable (default no normalization). Data are plotted as ``plot(lags, c, **kwargs)`` Return value is a tuple (*lags*, *c*, *line*) where: - *lags* are a length 2*maxlags+1 lag vector - *c* is the 2*maxlags+1 auto correlation vector - *line* is a :class:`~matplotlib.lines.Line2D` instance returned by :meth:`plot` The default *linestyle* is None and the default *marker* is ``'o'``, though these can be overridden with keyword args. The cross correlation is performed with :func:`numpy.correlate` with *mode* = 2. If *usevlines* is *True*, :meth:`~matplotlib.axes.Axes.vlines` rather than :meth:`~matplotlib.axes.Axes.plot` is used to draw vertical lines from the origin to the acorr. Otherwise, the plot style is determined by the kwargs, which are :class:`~matplotlib.lines.Line2D` properties. *maxlags* is a positive integer detailing the number of lags to show. The default value of *None* will return all :math:`2 imes \mathrm{len}(x) - 1` lags. The return value is a tuple (*lags*, *c*, *linecol*, *b*) where - *linecol* is the :class:`~matplotlib.collections.LineCollection` - *b* is the *x*-axis. .. seealso:: :meth:`~matplotlib.axes.Axes.plot` or :meth:`~matplotlib.axes.Axes.vlines` For documentation on valid kwargs. **Example:** :func:`~matplotlib.pyplot.xcorr` above, and :func:`~matplotlib.pyplot.acorr` below. **Example:** .. plot:: mpl_examples/pylab_examples/xcorr_demo.py (txcorr(R(RUR<((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytacorr^s|djoCti|||d |d!|d"| d#t ||d$|i!}q|djoCti"|||d |d!|d"| d#t ||d$|i!}q|djoCti#|||d |d!|d"| d#t ||d$|i!}q|djo=ti$|d |d!|d"| d#t ||d$|i!}qnti%t&| d%d%dfd| d%d%dfd}| |} ti'| f|d |d!|d"| d#t ||d$|i!}|i(t)i*|i+| |i,||d%jo|d%j ot-|ti.pt/n|i0ti||i1||i2||d%j p | d%j o|i3|| q|i4n|}|}ti5|}ti6|}ti5|}ti6|}||} ||}!d&| d&|!}"}#||"||#f||"||#ff}$|i7|$|i8|i9||S(/s" call signatures:: scatter(x, y, s=20, c='b', marker='o', cmap=None, norm=None, vmin=None, vmax=None, alpha=1.0, linewidths=None, verts=None, **kwargs) Make a scatter plot of *x* versus *y*, where *x*, *y* are converted to 1-D sequences which must be of the same length, *N*. Keyword arguments: *s*: size in points^2. It is a scalar or an array of the same length as *x* and *y*. *c*: a color. *c* can be a single color format string, or a sequence of color specifications of length *N*, or a sequence of *N* numbers to be mapped to colors using the *cmap* and *norm* specified via kwargs (see below). Note that *c* should not be a single numeric RGB or RGBA sequence because that is indistinguishable from an array of values to be colormapped. *c* can be a 2-D array in which the rows are RGB or RGBA, however. *marker*: can be one of: ===== ============== Value Description ===== ============== 's' square 'o' circle '^' triangle up '>' triangle right 'v' triangle down '<' triangle left 'd' diamond 'p' pentagram 'h' hexagon '8' octagon '+' plus 'x' cross ===== ============== The marker can also be a tuple (*numsides*, *style*, *angle*), which will create a custom, regular symbol. *numsides*: the number of sides *style*: the style of the regular symbol: ===== ============================================= Value Description ===== ============================================= 0 a regular polygon 1 a star-like symbol 2 an asterisk 3 a circle (*numsides* and *angle* is ignored) ===== ============================================= *angle*: the angle of rotation of the symbol Finally, *marker* can be (*verts*, 0): *verts* is a sequence of (*x*, *y*) vertices for a custom scatter symbol. Alternatively, use the kwarg combination *marker* = *None*, *verts* = *verts*. Any or all of *x*, *y*, *s*, and *c* may be masked arrays, in which case all masks will be combined and only unmasked points will be plotted. Other keyword arguments: the color mapping and normalization arguments will be used only if *c* is an array of floats. *cmap*: [ None | Colormap ] A :class:`matplotlib.colors.Colormap` instance or registered name. If *None*, defaults to rc ``image.cmap``. *cmap* is only used if *c* is an array of floats. *norm*: [ None | Normalize ] A :class:`matplotlib.colors.Normalize` instance is used to scale luminance data to 0, 1. If *None*, use the default :func:`normalize`. *norm* is only used if *c* is an array of floats. *vmin*/*vmax*: *vmin* and *vmax* are used in conjunction with norm to normalize luminance data. If either are None, the min and max of the color array *C* is used. Note if you pass a *norm* instance, your settings for *vmin* and *vmax* will be ignored. *alpha*: 0 <= scalar <= 1 The alpha value for the patches *linewidths*: [ None | scalar | sequence ] If *None*, defaults to (lines.linewidth,). Note that this is a tuple, and if you set the linewidths argument you must set it as a sequence of floats, as required by :class:`~matplotlib.collections.RegularPolyCollection`. Optional kwargs control the :class:`~matplotlib.collections.Collection` properties; in particular: *edgecolors*: 'none' to plot faces with no outlines *facecolors*: 'none' to plot unfilled outlines Here are the standard descriptions of all the :class:`~matplotlib.collections.Collection` kwargs: %(Collection)s A :class:`~matplotlib.collections.Collection` instance is returned. ig@iRiRt^g@t>Rptxt<|;D]\}.}?|:|.}@|.t|:djo|:|.d}An|@t i=|:d}A|<|.pq{ n|=i|@d f|@df|Adf|Ad fg|>i|?q{ Wt i |>}>t>i?|i'|i@}Bt%i&|=d|Bddi0|>i1| i2| i3| i4||i9t i;|||}:|9|||:}Ct i|C}<gg}=}>xt<|CD]\}.}?|:|.}@|.t|:djo|:|.d}An|@t i=|:d}A|<|.pqn|=id |@fd |Afd|Afd|@fg|>i|?qWt i |>}>t>i?|i@|i'}Bt%i&|=d|Bddi0|>i1| i2| i3| i4||i9|5_A|5_Bfd}D|5iCiDd|D|5S( s3 call signature:: hexbin(x, y, C = None, gridsize = 100, bins = None, xscale = 'linear', yscale = 'linear', cmap=None, norm=None, vmin=None, vmax=None, alpha=1.0, linewidths=None, edgecolors='none' reduce_C_function = np.mean, mincnt=None, marginals=True **kwargs) Make a hexagonal binning plot of *x* versus *y*, where *x*, *y* are 1-D sequences of the same length, *N*. If *C* is None (the default), this is a histogram of the number of occurences of the observations at (x[i],y[i]). If *C* is specified, it specifies values at the coordinate (x[i],y[i]). These values are accumulated for each hexagonal bin and then reduced according to *reduce_C_function*, which defaults to numpy's mean function (np.mean). (If *C* is specified, it must also be a 1-D sequence of the same length as *x* and *y*.) *x*, *y* and/or *C* may be masked arrays, in which case only unmasked points will be plotted. Optional keyword arguments: *gridsize*: [ 100 | integer ] The number of hexagons in the *x*-direction, default is 100. The corresponding number of hexagons in the *y*-direction is chosen such that the hexagons are approximately regular. Alternatively, gridsize can be a tuple with two elements specifying the number of hexagons in the *x*-direction and the *y*-direction. *bins*: [ None | 'log' | integer | sequence ] If *None*, no binning is applied; the color of each hexagon directly corresponds to its count value. If 'log', use a logarithmic scale for the color map. Internally, :math:`log_{10}(i+1)` is used to determine the hexagon color. If an integer, divide the counts in the specified number of bins, and color the hexagons accordingly. If a sequence of values, the values of the lower bound of the bins to be used. *xscale*: [ 'linear' | 'log' ] Use a linear or log10 scale on the horizontal axis. *scale*: [ 'linear' | 'log' ] Use a linear or log10 scale on the vertical axis. *mincnt*: None | a positive integer If not None, only display cells with more than *mincnt* number of points in the cell *marginals*: True|False if marginals is True, plot the marginal density as colormapped rectagles along the bottom of the x-axis and left of the y-axis *extent*: [ None | scalars (left, right, bottom, top) ] The limits of the bins. The default assigns the limits based on gridsize, x, y, xscale and yscale. Other keyword arguments controlling color mapping and normalization arguments: *cmap*: [ None | Colormap ] a :class:`matplotlib.cm.Colormap` instance. If *None*, defaults to rc ``image.cmap``. *norm*: [ None | Normalize ] :class:`matplotlib.colors.Normalize` instance is used to scale luminance data to 0,1. *vmin*/*vmax*: scalar *vmin* and *vmax* are used in conjunction with *norm* to normalize luminance data. If either are *None*, the min and max of the color array *C* is used. Note if you pass a norm instance, your settings for *vmin* and *vmax* will be ignored. *alpha*: scalar the alpha value for the patches *linewidths*: [ None | scalar ] If *None*, defaults to rc lines.linewidth. Note that this is a tuple, and if you set the linewidths argument you must set it as a sequence of floats, as required by :class:`~matplotlib.collections.RegularPolyCollection`. Other keyword arguments controlling the Collection properties: *edgecolors*: [ None | mpl color | color sequence ] If 'none', draws the edges in the same color as the fill color. This is the default, as it avoids unsightly unpainted pixels between the hexagons. If *None*, draws the outlines in the default color. If a matplotlib color arg or sequence of rgba tuples, draws the outlines in the specified color. Here are the standard descriptions of all the :class:`~matplotlib.collections.Collection` kwargs: %(Collection)s The return value is a :class:`~matplotlib.collections.PolyCollection` instance; use :meth:`~matplotlib.collection.PolyCollection.get_array` on this :class:`~matplotlib.collections.PolyCollection` to get the counts in each hexagon.. If marginals is True, horizontal bar and vertical bar (both PolyCollections) will be attached to the return collection as attributes *hbar* and *vbar* **Example:** .. plot:: mpl_examples/pylab_examples/hexbin_demo.py RRR<iR^g& .>iig@g?iRfggg?giNR%i RtfaceRRRc s{|i|idt|d}tit|}x:tt|D]&}|||j}||| 0-1 *norm* is only used for an MxN float array. *vmin*/*vmax*: [ None | scalar ] Used to scale a luminance image to 0-1. If either is *None*, the min and max of the luminance values will be used. Note if *norm* is not *None*, the settings for *vmin* and *vmax* will be ignored. *alpha*: scalar The alpha blending value, between 0 (transparent) and 1 (opaque) *origin*: [ None | 'upper' | 'lower' ] Place the [0,0] index of the array in the upper left or lower left corner of the axes. If *None*, default to rc ``image.origin``. *extent*: [ None | scalars (left, right, bottom, top) ] Data limits for the axes. The default assigns zero-based row, column indices to the *x*, *y* centers of the pixels. *shape*: [ None | scalars (columns, rows) ] For raw buffer images *filternorm*: A parameter for the antigrain image resize filter. From the antigrain documentation, if *filternorm* = 1, the filter normalizes integer values and corrects the rounding errors. It doesn't do anything with the source floating point values, it corrects only integers according to the rule of 1.0 which means that any sum of pixel weights must be equal to 1.0. So, the filter function must produce a graph of the proper shape. *filterrad*: The filter radius for filters that have a radius parameter, i.e. when interpolation is one of: 'sinc', 'lanczos' or 'blackman' Additional kwargs are :class:`~matplotlib.artist.Artist` properties: %(Artist)s **Example:** .. plot:: mpl_examples/pylab_examples/image_demo.py s image.aspectt filternormt filterradtresampleN(RRRRRRR?RRRRtset_dataRRR6R0RRtset_urlt get_extentRRRRRR&Rn(R(RBRRRHt interpolationRRRtoriginRRRRLRMtimlimRNturlR<RRURVRWRXR((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytimshows6h            c G st|djoO|d}|i\}}titi|dti|d\}}n=t|djo|\}}}ntd||f|id}|id} t|idjp|iddjo+|id|} | i| dd}nt|idjp|iddjo+|i| d} | i|dd}n|i|ijotd||fn|||fS( Niiis%Illegal arguments to %s; see help(%s)iiRs,Incompatible X, Y inputs to %s; see help(%s)(R,RRRPtmeshgridRiRBtreshapeR( R(tfuncnameR;RtnumRowstnumColsRBRRtNyRUR"((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt _pcolorargss* 6  **c( O s,|ip|in|idd}|idd }|idd }|idd }|idd }|idd}|id |\} } } | i\} } ti| } ti| } ti| } ti| ti| }|d d d d f|d d d d f|d d d d f|d d d d f}ti| d | d d | d f|}t i }t i }|d ji }||ti | d d d d fi }||ti | d d d d fi }||ti | d d d d fi }||ti | d d d d fi }||ti | d d d d fi }||ti | d d d d fi }||ti | d d d d fi }||ti | d d d d fi }t|}t i|d d |f|d d |f|d d |f|d d |f|d d |f|d d |f|d d |f|d d |f|d d |f|d d |ff dd }|i|ddf}||ti | d | d d | d fi } |djod}d}n d}d}|id||idd|id|ti||} | i|| i| |d j ot|tiptn| i|| i||d j p |d j o| i||n | i|it| i }!| i }"t i!|!}#t i"|!}$t i!|"}%t i"|"}&|#|%f|$|&ff}'|i#|'|i$|i%| | S(s6 call signatures:: pcolor(C, **kwargs) pcolor(X, Y, C, **kwargs) Create a pseudocolor plot of a 2-D array. *C* is the array of color values. *X* and *Y*, if given, specify the (*x*, *y*) coordinates of the colored quadrilaterals; the quadrilateral for C[i,j] has corners at:: (X[i, j], Y[i, j]), (X[i, j+1], Y[i, j+1]), (X[i+1, j], Y[i+1, j]), (X[i+1, j+1], Y[i+1, j+1]). Ideally the dimensions of *X* and *Y* should be one greater than those of *C*; if the dimensions are the same, then the last row and column of *C* will be ignored. Note that the the column index corresponds to the *x*-coordinate, and the row index corresponds to *y*; for details, see the :ref:`Grid Orientation ` section below. If either or both of *X* and *Y* are 1-D arrays or column vectors, they will be expanded as needed into the appropriate 2-D arrays, making a rectangular grid. *X*, *Y* and *C* may be masked arrays. If either C[i, j], or one of the vertices surrounding C[i,j] (*X* or *Y* at [i, j], [i+1, j], [i, j+1],[i+1, j+1]) is masked, nothing is plotted. Keyword arguments: *cmap*: [ None | Colormap ] A :class:`matplotlib.cm.Colormap` instance. If *None*, use rc settings. norm: [ None | Normalize ] An :class:`matplotlib.colors.Normalize` instance is used to scale luminance data to 0,1. If *None*, defaults to :func:`normalize`. *vmin*/*vmax*: [ None | scalar ] *vmin* and *vmax* are used in conjunction with *norm* to normalize luminance data. If either are *None*, the min and max of the color array *C* is used. If you pass a *norm* instance, *vmin* and *vmax* will be ignored. *shading*: [ 'flat' | 'faceted' ] If 'faceted', a black grid is drawn around each rectangle; if 'flat', edges are not drawn. Default is 'flat', contrary to Matlab(TM). This kwarg is deprecated; please use 'edgecolors' instead: * shading='flat' -- edgecolors='None' * shading='faceted -- edgecolors='k' *edgecolors*: [ None | 'None' | color | color sequence] If *None*, the rc setting is used by default. If 'None', edges will not be visible. An mpl color or sequence of colors will set the edge color *alpha*: 0 <= scalar <= 1 the alpha blending value Return value is a :class:`matplotlib.collection.Collection` instance. .. _axes-pcolor-grid-orientation: The grid orientation follows the Matlab(TM) convention: an array *C* with shape (*nrows*, *ncolumns*) is plotted with the column number as *X* and the row number as *Y*, increasing up; hence it is plotted the way the array would be printed, except that the *Y* axis is reversed. That is, *C* is taken as *C*(*y*, *x*). Similarly for :func:`~matplotlib.pyplot.meshgrid`:: x = np.arange(5) y = np.arange(3) X, Y = meshgrid(x,y) is equivalent to: X = array([[0, 1, 2, 3, 4], [0, 1, 2, 3, 4], [0, 1, 2, 3, 4]]) Y = array([[0, 0, 0, 0, 0], [1, 1, 1, 1, 1], [2, 2, 2, 2, 2]]) so if you have:: C = rand( len(x), len(y)) then you need:: pcolor(X, Y, C.T) or:: pcolor(C.T) Matlab :func:`pcolor` always discards the last row and column of *C*, but matplotlib displays the last row and column if *X* and *Y* are not specified, or if *X* and *Y* have one more row and column than *C*. kwargs can be used to control the :class:`~matplotlib.collection.PolyCollection` properties: %(PolyCollection)s Rg?RRRRtshadingtflattpcoloriiiNRiiRg?RRt antialiasedsR(iiii((iiii(g?(g?(i(&RRR7RR]RRRRt getmaskarrayRPRTRRtfilledR,t concatenateRXRRRRRRRRR?RRRRRRt compressedR(R)RRR((R(R;R<RRRRRR^RBRRR\RRtxymaskRTRt ravelmasktX1tY1tX2tY2tX3tY3tX4tY4tnpolyRRRRRRUR"RRRRR((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyR`s| j1  44444444 ,&&&, <              cO s|ip|in|idd}|idd}|idd}|idd}|idd}|idd}|id d } |id t} |id |\} } } | i\}}ti| d |dd |df} | i} | i} t i ||dfdt }| |ddd f<| |dddf<|djp | d jo d}nd }t i |d|d||d | }|i||i| |dj ot|tiptn|i||i||dj p |dj o|i||n |i|itt i| }t i| }t i| }t i| }||f||ff}|i||i|i||S(s call signatures:: pcolormesh(C) pcolormesh(X, Y, C) pcolormesh(C, **kwargs) *C* may be a masked array, but *X* and *Y* may not. Masked array support is implemented via *cmap* and *norm*; in contrast, :func:`~matplotlib.pyplot.pcolor` simply does not draw quadrilaterals with masked colors or vertices. Keyword arguments: *cmap*: [ None | Colormap ] A :class:`matplotlib.cm.Colormap` instance. If None, use rc settings. *norm*: [ None | Normalize ] A :class:`matplotlib.colors.Normalize` instance is used to scale luminance data to 0,1. If None, defaults to :func:`normalize`. *vmin*/*vmax*: [ None | scalar ] *vmin* and *vmax* are used in conjunction with *norm* to normalize luminance data. If either are *None*, the min and max of the color array *C* is used. If you pass a *norm* instance, *vmin* and *vmax* will be ignored. *shading*: [ 'flat' | 'faceted' ] If 'faceted', a black grid is drawn around each rectangle; if 'flat', edges are not drawn. Default is 'flat', contrary to Matlab(TM). This kwarg is deprecated; please use 'edgecolors' instead: * shading='flat' -- edgecolors='None' * shading='faceted -- edgecolors='k' *edgecolors*: [ None | 'None' | color | color sequence] If None, the rc setting is used by default. If 'None', edges will not be visible. An mpl color or sequence of colors will set the edge color *alpha*: 0 <= scalar <= 1 the alpha blending value Return value is a :class:`matplotlib.collection.QuadMesh` object. kwargs can be used to control the :class:`matplotlib.collections.QuadMesh` properties: %(QuadMesh)s .. seealso:: :func:`~matplotlib.pyplot.pcolor` For an explanation of the grid orientation and the expansion of 1-D *X* and/or *Y* to 2-D arrays. Rg?RRRRR^R_RRt antialiasedt pcolormeshiiiRfNR(RRR7RRR]RRRRRPRRjRtQuadMeshRRRRRR?RRRRRR(R)RRR(R(R;R<RRRRRR^RRqRBRRR\Rtcoordst showedgesRRRRRR((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyRrsV@ -              cO s|ip|in|idd}|idd}|idd}|idd}|idd}|dj ot|tiptn|d}|i\} } t |djo"d } d | g} d | g} nVt |d jo6|d \} } t i | } t i | } | i djo| i djo| i d jo| i d jo d } q0t i| }t i| }t i|d t i|ijo3t i|d t i|ijo d } q0d} q@| i d jo| i d jo d} q@tdn td| djoti|}| i}| i}| d}| d}t i||d ft i}||ddd f<||dddfyLtiti|}t|i djod|i df|_ nWnzt |doYt|d oGg}x4tt|D] }|iti||qW|}q+t dnXt|t|jo t d nx_tt|D]4}t||t||jo t d qdqdWnd'gt|}ti |p |d'j}tid jo%td |d t|d t}ntd |d t|}g}xPtt|D]<}ti|||d|||\}}|i|q8W|otd'}ti|o#|djotd'd'd}n|o@g}|D](}||ti||i|q~}q8g}|D]}|||i|q~}ng}|idoti|}t}| d'j otdtd| }n$t|djo d}nd}|djo[||t|}|}t|djo$d||ddt|}qQd}n;|djo ||}d7\}}t}nt d|| djp | djo|d|7}nG| djo||7}n,| djo| djot d| n| djoxU|D]}|ii } |i!|d ||d|d|d dd!| d"| }!|i|!|o%|d'jo d}n||7}n||7}qWq | d#jox|D]}|ii } |i"|d ||d|d$|d dd!| d"| }!|i|!|o%|d'jo d}n||7}n||7}qWq t d%| n|id&octi#dt|ti$}ti#dt|ti$}"|||dd'd<|dd'd<| djp | djo|d|d|d8}nW| djo|d|d|d7}n,| djo| djot d| n| oTd8\|"d<|"d<| djo|i%d!q| d#jo|i&d!qnt}#|d)jo t}#n|d&jot d|nx|D]}|||"ddd<|"dd'd<| djo|"|}}"n| d#jot d%| n|ii } |#o)|i|i'||"d*td+| q|i|i'||"d*td,| d-tqW| djojd|i(i)d}$}%x'|D]}ti*||dj}$q Wt|$d.d(}$|$|%f|i(_)nx| d#jojd|i(i+d}&}'x'|D]}ti*||dj}&qE Wt|&d.d(}&|&|'f|i(_+n|i,nt d|| i-d/d0}(t|(o"|(gd1gt|d})n6t.o%t/|(d1gt|d})n t d2xNt0||)D]=\}!}*x.|!D]&}+|+i1| |+i2|*d1}*qE Wq2 W|o|i3t| d#joJ|i,d3td4t|i4i5i6|d|d},|i7|,q( |i,d3td4t|i8i5i6|d|d}-|i9|-nt|djo"|d|ti:d5|dfS||ti:d6|fSd'S(9s call signature:: hist(x, bins=10, range=None, normed=False, cumulative=False, bottom=None, histtype='bar', align='mid', orientation='vertical', rwidth=None, log=False, **kwargs) Compute and draw the histogram of *x*. The return value is a tuple (*n*, *bins*, *patches*) or ([*n0*, *n1*, ...], *bins*, [*patches0*, *patches1*,...]) if the input contains multiple data. Keyword arguments: *bins*: Either an integer number of bins or a sequence giving the bins. *x* are the data to be binned. *x* can be an array, a 2D array with multiple data in its columns, or a list of arrays with data of different length. Note, if *bins* is an integer input argument=numbins, *bins* + 1 bin edges will be returned, compatible with the semantics of :func:`numpy.histogram` with the *new* = True argument. Unequally spaced bins are supported if *bins* is a sequence. *range*: The lower and upper range of the bins. Lower and upper outliers are ignored. If not provided, *range* is (x.min(), x.max()). Range has no effect if *bins* is a sequence. If *bins* is a sequence or *range* is specified, autoscaling is set off (*autoscale_on* is set to *False*) and the xaxis limits are set to encompass the full specified bin range. *normed*: If *True*, the first element of the return tuple will be the counts normalized to form a probability density, i.e., ``n/(len(x)*dbin)``. In a probability density, the integral of the histogram should be 1; you can verify that with a trapezoidal integration of the probability density function:: pdf, bins, patches = ax.hist(...) print np.sum(pdf * np.diff(bins)) *weights* An array of weights, of the same shape as *x*. Each value in *x* only contributes its associated weight towards the bin count (instead of 1). If *normed* is True, the weights are normalized, so that the integral of the density over the range remains 1. *cumulative*: If *True*, then a histogram is computed where each bin gives the counts in that bin plus all bins for smaller values. The last bin gives the total number of datapoints. If *normed* is also *True* then the histogram is normalized such that the last bin equals 1. If *cumulative* evaluates to less than 0 (e.g. -1), the direction of accumulation is reversed. In this case, if *normed* is also *True*, then the histogram is normalized such that the first bin equals 1. *histtype*: [ 'bar' | 'barstacked' | 'step' | 'stepfilled' ] The type of histogram to draw. - 'bar' is a traditional bar-type histogram. If multiple data are given the bars are aranged side by side. - 'barstacked' is a bar-type histogram where multiple data are stacked on top of each other. - 'step' generates a lineplot that is by default unfilled. - 'stepfilled' generates a lineplot that is by default filled. *align*: ['left' | 'mid' | 'right' ] Controls how the histogram is plotted. - 'left': bars are centered on the left bin edges. - 'mid': bars are centered between the bin edges. - 'right': bars are centered on the right bin edges. *orientation*: [ 'horizontal' | 'vertical' ] If 'horizontal', :func:`~matplotlib.pyplot.barh` will be used for bar-type histograms and the *bottom* kwarg will be the left edges. *rwidth*: The relative width of the bars as a fraction of the bin width. If *None*, automatically compute the width. Ignored if *histtype* = 'step' or 'stepfilled'. *log*: If *True*, the histogram axis will be set to a log scale. If *log* is *True* and *x* is a 1D array, empty bins will be filtered out and only the non-empty (*n*, *bins*, *patches*) will be returned. kwargs are used to update the properties of the hist :class:`~matplotlib.patches.Rectangle` instances: %(Rectangle)s You can use labels for your histogram, and only the first :class:`~matplotlib.patches.Rectangle` gets the label (the others get the magic string '_nolegend_'. This will make the histograms work in the intuitive way for bar charts:: ax.hist(10+2*np.random.randn(1000), label='men') ax.hist(12+3*np.random.randn(1000), label='women', alpha=0.5) ax.legend() label can also be a sequence of strings. If multiple data is provided in *x*, the labels are asigned sequentially to the histograms. **Example:** .. plot:: mpl_examples/pylab_examples/histogram_demo.py RhsFhist now uses the rwidth to give relative width and not absolute widthiiis>2D hist should be nsamples x nvariables; this looks transposeds/Can not use provided data to create a histograms-Can not use provided weights to create a hists'weights should have the same shape as xs1.3RRtnewtweightsiR7g?gg?gt barstackedsinvalid histtype: %sRRg?RRRsinvalid align: %sRRiR*R^RRRsinvalid orientation: %sRNg0.++t stepfilledR_R^RRJg?RRRs4invalid label: must be string or sequence of stringsRRRsLists of Patches(gg(g0.++g0.++(;RRRkRRRPRRR,RRRaRbR RRgRlRnRt __version__RRiRdt histogramtsliceRRtcumsumR RRRmRR2R8R7RRjRRRJRRR(RRR7RR$RhRRRR5RRRkR6RjR(.R(RURRRRt cumulativeRthisttypeR*R+trwidthR^R<ttxR Rvttwt binsgivent hist_kwargsR+R!tslcRRR"ttotwidthtstackedtdrRhtdwtboffsetRR0R"RJRURVRWRXRRMtlblRRR((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pythist sr~  1#  #   !  ) @3   $               '      '      "%      ##"iiRc  K sc|ip|inti|||||||| | \} } t| f| _| |7} | d tfjo d}nd}|i| dt i | | |i d|i d||i t|ii\}}||}tt i |}|djo d}nd|}t iti|ti|d|}|i|| | fS( s call signature:: psd(x, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none, window=mlab.window_hanning, noverlap=0, pad_to=None, sides='default', scale_by_freq=None, **kwargs) The power spectral density by Welch's average periodogram method. The vector *x* is divided into *NFFT* length segments. Each segment is detrended by function *detrend* and windowed by function *window*. *noverlap* gives the length of the overlap between segments. The :math:`|\mathrm{fft}(i)|^2` of each segment :math:`i` are averaged to compute *Pxx*, with a scaling to correct for power loss due to windowing. *Fs* is the sampling frequency. %(PSD)s *Fc*: integer The center frequency of *x* (defaults to 0), which offsets the x extents of the plot to reflect the frequency range used when a signal is acquired and then filtered and downsampled to baseband. Returns the tuple (*Pxx*, *freqs*). For plotting, the power is plotted as :math:`10\log_{10}(P_{xx})` for decibels, though *Pxx* itself is returned. References: Bendat & Piersol -- Random Data: Analysis and Measurement Procedures, John Wiley & Sons (1986) kwargs control the :class:`~matplotlib.lines.Line2D` properties: %(Line2D)s **Example:** .. plot:: mpl_examples/pylab_examples/psd_demo.py sdB/HztdBi t FrequencysPower Spectral Density (%s)ig?iN(RRRtpsdR,RRRRdR$RPR\RRRRRR1RiRSRtceilRU(R(RUtNFFTtFstFcRtwindowtnoverlaptpad_totsidest scale_by_freqR<tpxxtfreqst psd_unitsRRtintvtlogiRRD((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyRns,-         + tPSDc  K s+|ip|inti|||||||| | | \} }t|f| _||7}|i|dtiti | | |i d|i d|i t |ii\}}||}dtti|}titi|ti|d|}|i|| |fS(s call signature:: csd(x, y, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none, window=mlab.window_hanning, noverlap=0, pad_to=None, sides='default', scale_by_freq=None, **kwargs) The cross spectral density :math:`P_{xy}` by Welch's average periodogram method. The vectors *x* and *y* are divided into *NFFT* length segments. Each segment is detrended by function *detrend* and windowed by function *window*. The product of the direct FFTs of *x* and *y* are averaged over each segment to compute :math:`P_{xy}`, with a scaling to correct for power loss due to windowing. Returns the tuple (*Pxy*, *freqs*). *P* is the cross spectrum (complex valued), and :math:`10\log_{10}|P_{xy}|` is plotted. %(PSD)s *Fc*: integer The center frequency of *x* (defaults to 0), which offsets the x extents of the plot to reflect the frequency range used when a signal is acquired and then filtered and downsampled to baseband. References: Bendat & Piersol -- Random Data: Analysis and Measurement Procedures, John Wiley & Sons (1986) kwargs control the Line2D properties: %(Line2D)s **Example:** .. plot:: mpl_examples/pylab_examples/csd_demo.py .. seealso: :meth:`psd` For a description of the optional parameters. i RsCross Spectrum Magnitude (dB)i(RRRtcsdR,RRR$RPR\tabsoluteRRRRdRRR1RiRSRRRU(R(RUR"RRRRRRRRRR<tpxyRRRRRRD((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyRs /  )    + c  K s|ip|inti|||||||| \} }||7}|i|| | |id|id|it| |fS(s call signature:: cohere(x, y, NFFT=256, Fs=2, Fc=0, detrend = mlab.detrend_none, window = mlab.window_hanning, noverlap=0, pad_to=None, sides='default', scale_by_freq=None, **kwargs) :meth:`cohere` the coherence between *x* and *y*. Coherence is the normalized cross spectral density: .. math:: C_{xy} = \frac{|P_{xy}|^2}{P_{xx}P_{yy}} %(PSD)s *Fc*: integer The center frequency of *x* (defaults to 0), which offsets the x extents of the plot to reflect the frequency range used when a signal is acquired and then filtered and downsampled to baseband. The return value is a tuple (*Cxy*, *f*), where *f* are the frequencies of the coherence vector. kwargs are applied to the lines. References: * Bendat & Piersol -- Random Data: Analysis and Measurement Procedures, John Wiley & Sons (1986) kwargs control the :class:`~matplotlib.lines.Line2D` properties of the coherence plot: %(Line2D)s **Example:** .. plot:: mpl_examples/pylab_examples/cohere_demo.py Rt Coherence( RRRtcohereR$RRRRd(R(RUR"RRRRRRRRRR<tcxyR((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyRs,     ic  K s|ip|inti||||||| | | \}}}dti|}ti|}| djodti|f} n| \}}||7}|||d|df}|i ||d|| }|i d||||fS(s call signature:: specgram(x, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none, window=mlab.window_hanning, noverlap=128, cmap=None, xextent=None, pad_to=None, sides='default', scale_by_freq=None, **kwargs) Compute a spectrogram of data in *x*. Data are split into *NFFT* length segments and the PSD of each section is computed. The windowing function *window* is applied to each segment, and the amount of overlap of each segment is specified with *noverlap*. %(PSD)s *Fc*: integer The center frequency of *x* (defaults to 0), which offsets the y extents of the plot to reflect the frequency range used when a signal is acquired and then filtered and downsampled to baseband. *cmap*: A :class:`matplotlib.cm.Colormap` instance; if *None* use default determined by rc *xextent*: The image extent along the x-axis. xextent = (xmin,xmax) The default is (0,max(bins)), where bins is the return value from :func:`mlab.specgram` *kwargs*: Additional kwargs are passed on to imshow which makes the specgram image Return value is (*Pxx*, *freqs*, *bins*, *im*): - *bins* are the time points the spectrogram is calculated over - *freqs* is an array of frequencies - *Pxx* is a len(times) x len(freqs) array of power - *im* is a :class:`matplotlib.image.AxesImage` instance Note: If *x* is real (i.e. non-complex), only the positive spectrum is shown. If *x* is complex, both positive and negative parts of the spectrum are shown. This can be overridden using the *sides* keyword argument. **Example:** .. plot:: mpl_examples/pylab_examples/specgram_demo.py g$@iiRRN( RRRtspecgramRPR\tflipudRR)RVR(R(RURRRRRRRtxextentRRRR<tPxxRRtZRURVRR((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyR9s8     RFc K s|d%jod}tidn|d%jo'|d%jot|do d}n|d%jo|d%joti|}ti||j}d|jo#tiddgdd |d precision` will be plotted. For :class:`scipy.sparse.spmatrix` instances, there is a special case: if *precision* is 'present', any value present in the array will be plotted, even if it is identically zero. The array will be plotted as it would be printed, with the first index (row) increasing down and the second index (column) increasing to the right. By default aspect is 'equal', so that each array element occupies a square space; set the aspect kwarg to 'auto' to allow the plot to fill the plot box, or to any scalar number to specify the aspect ratio of an array element directly. Two plotting styles are available: image or marker. Both are available for full arrays, but only the marker style works for :class:`scipy.sparse.spmatrix` instances. If *marker* and *markersize* are *None*, an image will be returned and any remaining kwargs are passed to :func:`~matplotlib.pyplot.imshow`; else, a :class:`~matplotlib.lines.Line2D` object will be returned with the value of marker determining the marker type, and any remaining kwargs passed to the :meth:`~matplotlib.axes.Axes.plot` method. If *marker* and *markersize* are *None*, useful kwargs include: * *cmap* * *alpha* .. seealso:: :func:`~matplotlib.pyplot.imshow` For image options. For controlling colors, e.g. cyan background and red marks, use:: cmap = mcolors.ListedColormap(['c','r']) If *marker* or *markersize* is not *None*, useful kwargs include: * *marker* * *markersize* * *color* Useful values for *marker* include: * 's' square (default) * 'o' circle * '.' point * ',' pixel .. seealso:: :func:`~matplotlib.pyplot.plot` For plotting options isUse precision=0 instead of NonettocooRRRvR#R8tbinarygg?RRRxRHRRSR3tpresenti RRRt markersizeRURVRWRXg?Rtnbinsi tstepsiiitintegerN( RRaRRARPRRRtListedColormapRRRVRRR<tdatatnonzeroR RZRRRRR.tset_yR5Rtset_ticks_positionRbtmtickert MaxNLocatorRdR6(R(Rt precisionRRRHR<RRRRR=RR"RURtmarks((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytspys`H *              c K sti|}|i\}}d|d|ddg}h|d6dd6dd6dd 6}|i||i||}|iid |ii|ii d |ii t i d d dddddgdt |ii t i d d dddddgdt |S(s Plot a matrix or array as an image. The matrix will be shown the way it would be printed, with the first row at the top. Row and column numbering is zero-based. Argument: *Z* anything that can be interpreted as a 2-D array kwargs all are passed to :meth:`~matplotlib.axes.Axes.imshow`. :meth:`matshow` sets defaults for *extent*, *origin*, *interpolation*, and *aspect*; use care in overriding the *extent* and *origin* kwargs, because they interact. (Also, if you want to change them, you probably should be using imshow directly in your own version of matshow.) Returns: an :class:`matplotlib.image.AxesImage` instance. gg?RR3RSRxRRRFRHg?RRi Riiii R(RPRRRRRVR.RR5RRRbRRRdR6(R(RR<RRRR[R((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytmatshows&      c C sgg}g}|i||iio|i|in|iioB|i|ii|ii|\}}|i||gn|iioB|i|ii|ii|\}}|i||gn|ig}|D]} || i|q~t i i g} |D]1} | i djp| i djo | | q&q&~ } | S(st return the tight bounding box of the axes. The dimension of the Bbox in canvas coordinate. i(RnR.RR5Rtget_ticklabel_extentsRR6RRRRRhRi( R(R R%Rtbbx1tbbx2tbby1tbby2RRRRt_bbox((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt get_tightbbox)s  1QcC ssxl|i|ifD]X}|idjo,|i}|iti|i|iq|iti qWdS(s(Add autoscaling minor ticks to the axes.R^N( R5R6Rt_scaletset_minor_locatorRt LogLocatortbasetsubstAutoMinorLocator(R(RR((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt minorticks_onGs  #cC s0|iiti|iitidS(s!Remove minor ticks from the axes.N(R5RRt NullLocatorR6(R(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytminorticks_offPs(RwRxRyR8RtGrouperRRRRRdR)RRRRRRRRRRRRRRRRRRRRRR?tpropertytframeR@R0RARBRDRRKRGRMRR[R]RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRt_Axes__draw_animateRRR R!RtdedentRtkwdocdR.RRR/R0R1R2RQRkRRR_RRRRRRURtget_scale_docststripRBRERGRIRKRORPRQRRRjRRR`RRRTRURVRWRXRYRkRlRnRoRrRsRuRRwRR~RRRRRRRRRRt _Axes__pickRRRRRRR RRRRRRRR$RRRRRRt detrend_noneRR R RRR7R8R=RERaR'RRRPRzR$R&R*R'R(t quiverkey_docR.R+t quiver_docR1R/R2RJRERKRVR]R`RrRRRRt contour_docRRRRRRRRtwindow_hanningRRt psd_doc_dictRRRRRRRRR(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyRzFsl        &        !     U      1      ;                  &        $k       @       ;  7         6  7     $ %       E      E     O ;;77 S M E : 2 2 = U    F *+       :         .ii      v          _ E  A 5   E  { )  t SubplotBasecB s_eZdZdZdZdZdZdZdZdZ dZ d Z RS( s Base class for subplots, which are :class:`Axes` instances with additional methods to facilitate generating and manipulating a set of :class:`Axes` within a figure. c O s||_t|djoOt|d}t|djotdntt|\}}}n3t|djo|\}}}n td||}|d8}||jotdn||_||_||_|i |i i |||i |dS(s *fig* is a :class:`matplotlib.figure.Figure` instance. *args* is the tuple (*numRows*, *numCols*, *plotNum*), where the array of subplots in the figure has dimensions *numRows*, *numCols*, and where *plotNum* is the number of the subplot being created. *plotNum* starts at 1 in the upper left corner and increases to the right. If *numRows* <= *numCols* <= *plotNum* < 10, *args* can be the decimal integer *numRows* * 100 + *numCols* * 10 + *plotNum*. iiis+Argument to subplot must be a 3 digits longsIllegal argument to subplots%Subplot number exceeds total subplotsN( RR,tstrR tmapR1t_rowst_colst_numt update_paramst _axes_classR)tfigbox( R(RR;R<Rtrowstcolstnumttotal((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyR)]s$         cC s|i|i|idfS(s"get the subplot geometry, eg 2,2,3i(RRR(R(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt get_geometryscC s=||_||_|d|_|i|i|idS(s0change subplot geometry, eg. from 1,1,1 to 2,2,3iN(RRRRRR(R(tnumrowstnumcolsR((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pytchange_geometrys     cC s8|i}|i}|i}|ii}|i}|i}|i}|i}|i } |i } ||} ||} | || |d} | | }| || |d}| |}t ||\}}||d| ||}||||}t i i|||| |_||_||_||_||_dS(s0update the subplot position from fig.subplotparsiN(RRRRt subplotparsRRRRtwspacethspacetdivmodRRRRtrowNumtcolNumRZR[(R(RRRtparsRRRRR R ttotWidtht totHeightRptsepHRotsepWRRt figBottomtfigLeft((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyRs4                  cC s |idjS(Ni(R(R(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt is_first_colscC s |idjS(Ni(R(R(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt is_first_rowscC s|i|idjS(Ni(RRZ(R(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt is_last_rowscC s|i|idjS(Ni(RR[(R(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt is_last_colscC sd|i}|i}x!|iD]}|i|q%Wx!|iD]}|i|qIWdS(s set the visible property on ticklabels so xticklabels are visible only if the subplot is in the last row and yticklabels are visible only if the subplot is in the first column N(RRRKRRX(R(tlastrowtfirstcolR((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyt label_outers    ( RwRxRyR)RR RRRRRR(((s5/usr/lib64/python2.6/site-packages/matplotlib/axes.pyRVs )   0    cC sn|djo t}nti|}|djo7tid|it|fh|d6}|t|s<       G -  !