)Uc@ sddlmZmZddlZddlZddlZddlZddlZddlm Z ddl Z ddl Z ddl m Z ddlZejZddljZddlmZddljZddljZddljZddljZddlj Z!ddl"j#Z$ddlm%Z%ddl&j'Z'ddl(j)Z*ddl+j,Z-ddl.j/Z0ddl1j2Z2ddl3j4Z5ddl6j7Z8ddl9j:Z;ddl<j=Z>ddl?j@ZAddlBjCZDddlEjFZGddlHjIZJddlKjLZMddlNjOZPejQZQejRZRejSZSdZTdZUd ZVd fd YZWd ejXfd YZYddlZm[Z[m\Z\dfdYZ]iZ^e_dZ`e`Zae%jbjcd ejdeYe%jbjcdejdeYdS(i(tdivisiont generatorsN(t itemgetter(tma(tallow_rasterization(t docstringcC s@t|s|S|dkr tS|dkr0tStddS(Ntontoffs,string argument must be either 'on' or 'off'(tis_string_liketTruetFalset ValueError(ts((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt_string_to_bool*s   cC s]d }d }d }yitjj|}ytt|}Wntk rZ|||fSX||krt|||fSd }Wntk rnX|jddkrd}|jdd}n|jddkrd}|jdd}n|jddkrd}|jdd}ng|D] }|^q&}x|D]}|t j kr||d k rstd|n|}q?|t j kr|d k rtd|n|}q?|tjj kr|d k rtd |n|}q?td |q?W|d kr&|d kr&t d }n|d kr;d}n|d krPd}n|||fS( s Process a MATLAB style color/line style format string. Return a (*linestyle*, *color*) tuple as a result of the processing. Default values are ('-', 'b'). Example format strings include: * 'ko': black circles * '.b': blue dots * 'r--': red dashed lines .. seealso:: :func:`~matplotlib.Line2D.lineStyles` and :func:`~matplotlib.pyplot.colors` for all possible styles and color format string. s--its-.t tNones1Illegal format string "%s"; two linestyle symbolss.Illegal format string "%s"; two marker symbolss-Illegal format string "%s"; two color symbolss*Unrecognized character %c in format stringslines.linestyleN(RtmcolorstcolorConvertertto_rgbtstrtintR tfindtreplacetmlinest lineStylest lineMarkerstcolorstrcParams(tfmtt linestyletmarkertcolortfmtinttctchars((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt_process_plot_format3sb                 cC s|tdRRR R\tktvRURTRHtncxtncytjR]((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt _plot_argss4"      =co s|}xt|dkrdSt|dkrWx|j||D] }|VqDWdSt|drpd}nd}x#|j|| |D] }|VqW||}q dS(Niii(RhRvR(R/R<R=t remainingR]tisplit((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyR;5s   N(t__name__t __module__t__doc__R0RR.R?RIRKRXR^RfRvR;(((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyR*s    $  %tAxescB s eZdZdZejZejZdZe 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=d9Z>d:Z?e d;Z@d<ZAd=ZBd>ZCd?ZDd@ZEdAZFe e dBZGdCZHdDZIe e e dEZJdFZKdGZLdHZMdIZNdJZOdKZPdLZQdMZRdNZSdOZTdPZUdQZVe de dRZWe e e dSZXeYe edTZZdUZ[dVZ\dWZ]dXZ^dYZ_dZZ`d[Zad\Zbecjde d]d^Zed_Zfde d`ZgddaZhdbZidcZjddZkdeZldfZmdgZndhZoe e diZpdjZqe e e edkZrdlZsecjddmZtednZuedoZvdpZwdqZxedrZyecjde edsZzdtZ{duZ|dvZ}e e dwZ~dxZe e e edyZdzZecjdd{Zed|Zed}Zd~ZdZedZecjde edZe dZe dZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZe e dZdZecjde dZdZecjde e dZdZecjde e dZecjde edZecjddZecjdddddZecjdddddZecjddddZecjddddZecjddddZecjdddddZecjddZecjdde e edZecjddZecjddZecjddZecjddZecjde eje ddZdZdZdZdZecjdde dZecjdde dZecjddZddddZe e e e deddZecjde e de e deeeeed Zdddde e ee dZecjdddde e e e e e e e d Zecjde de dde e e e e e e deje edZecjddZdZejje_dZejje_ecjddZecjddZecjdde edZecjdde dZecjde e e e e e e e e e dde e e dZdZecjddZecjddZecjddZdZejje_dZejje_dZejjje_ecjddZdZdZdZdZecjdde ee ee ddde ee e d Zecjddddejejde de d Zecjddddejejde de d Zecjddddejejde de d Zecjddddejejde e e de d Zde e ddZdZdZdZdZdZejje_dZejje_dZejje_dZejje_RS(sa The :class:`Axes` contains most of the figure elements: :class:`~matplotlib.axis.Axis`, :class:`~matplotlib.axis.Tick`, :class:`~matplotlib.lines.Line2D`, :class:`~matplotlib.text.Text`, :class:`~matplotlib.patches.Polygon`, etc., and sets the coordinate system. The :class:`Axes` instance supports callbacks through a callbacks attribute which is a :class:`~matplotlib.cbook.CallbackRegistry` instance. The events you can connect to are 'xlim_changed' and 'ylim_changed' and the callback will be called with func(*ax*) where *ax* is the :class:`Axes` instance. t rectilinearcC sdt|jjS(NsAxes(%g,%g;%gx%g)(ttuplet _positiontbounds(R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt__str___sRc K sdidjgtjD]} t| ^qd6tjj|t|tj re||_ ntj j ||_ |j j |_ |j||jdd|_|jd||_||_|dk r|jj|||jdkrd|_nd|_n|dk rZ|jj|||jdkrNd|_nd|_n|j||j||j| jdd|j|_|j|dkrtd }n||_||_ td |_!d |_"td |_#i|_$|j%d|_&d|_'|j(dd|_)|j*t+|j,d|r_|j-|n| ru|j.| nt/| rtj0|| n|j1dk r|j1j2j3d|j4|_5n|j6dk r|j6j2j3d|j4|_7ndS(Ns5 Build an :class:`Axes` instance in :class:`~matplotlib.figure.Figure` *fig* with *rect=[left, bottom, width, height]* in :class:`~matplotlib.figure.Figure` coordinates Optional keyword arguments: ================ ========================================= Keyword Description ================ ========================================= *adjustable* [ 'box' | 'datalim' | 'box-forced'] *alpha* float: the alpha transparency (can be None) *anchor* [ 'C', 'SW', 'S', 'SE', 'E', 'NE', 'N', 'NW', 'W' ] *aspect* [ 'auto' | 'equal' | aspect_ratio ] *autoscale_on* [ *True* | *False* ] whether or not to autoscale the *viewlim* *axis_bgcolor* any matplotlib color, see :func:`~matplotlib.pyplot.colors` *axisbelow* draw the grids and ticks below the other artists *cursor_props* a (*float*, *color*) tuple *figure* a :class:`~matplotlib.figure.Figure` instance *frame_on* a boolean - draw the axes frame *label* the axes label *navigate* [ *True* | *False* ] *navigate_mode* [ 'PAN' | 'ZOOM' | None ] the navigation toolbar button status *position* [left, bottom, width, height] in class:`~matplotlib.figure.Figure` coords *sharex* an class:`~matplotlib.axes.Axes` instance to share the x-axis with *sharey* an class:`~matplotlib.axes.Axes` instance to share the y-axis with *title* the title string *visible* [ *True* | *False* ] whether the axes is visible *xlabel* the xlabel *xlim* (*xmin*, *xmax*) view limits *xscale* [%(scale)s] *xticklabels* sequence of strings *xticks* sequence of floats *ylabel* the ylabel strings *ylim* (*ymin*, *ymax*) view limits *yscale* [%(scale)s] *yticklabels* sequence of strings *yticks* sequence of floats ================ ========================================= s | tscaletautotboxtCtdatalimt axes_locatorsaxes.facecolorsaxes.axisbelowiЊs axes.holdiRqsunits finalize(iRq(8tjointmscaletget_scale_namestreprtmartisttArtistR0t isinstancet mtransformstBboxRt from_boundstfrozent_originalPositiontset_axest set_aspectt _adjustablet set_anchort_sharext_shareyRt_shared_x_axest_shared_y_axest set_labelt set_figuretset_axes_locatorRlt_gen_axes_spinestspinest _init_axisRt_axisbgt_frameont _axisbelowt_rasterization_zordert_holdt _connectedtclat fmt_xdatat fmt_ydatatset_cursor_propst_cachedRenderert set_navigateR tset_navigate_modet set_xscalet set_yscaleRhtsetpR6t callbackstconnecttrelimt_xcidR7t_ycid( R/tfigtrecttaxisbgtframeontsharextshareytlabeltxscaletyscaleR=RT((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyR0asl<7                               cO s|jS(sc get the axes bounding box in display space; *args* and *kwargs* are empty (tbbox(R/R<R=((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytget_window_extentscC stj||_|jdj|j|jdj|jtj||_|jdj|j|jdj|j|jdS(sAmove this out of __init__ because non-separable axes don't use ittbottomttoptlefttrightN(tmaxistXAxisR6Rt register_axistYAxisR7t_update_transScale(R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyRscC sxtjj||tj|j|j|_tjj |_ tjj |_ tj tj |_|jdS(s| Set the class:`~matplotlib.axes.Axes` figure accepts a class:`~matplotlib.figure.Figure` instance N(RRRRtTransformedBboxRt transFigureRRtunittdataLimtviewLimtTransformWrappertIdentityTransformt transScalet_set_lim_and_transforms(R/R((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyRscC stj|j|_tjtj|_tjtj|j |j|_ |j|j |j|_ tj |j |j|_ tj |j|j |_dS(s@ set the *dataLim* and *viewLim* :class:`~matplotlib.transforms.Bbox` attributes and the *transScale*, *transData*, *transLimits* and *transAxes* transformations. .. note:: This method is primarily used by rectilinear projections of the :class:`~matplotlib.axes.Axes` class, and is meant to be overridden by new kinds of projection axes that need different transformations and limits. (See :class:`~matplotlib.projections.polar.PolarAxes` for an example. N(RtBboxTransformToRt transAxesRRRtBboxTransformFromRRt transLimitst transDatatblended_transform_factoryt_xaxis_transformt_yaxis_transform(R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyR stgridcC s]|dkr|jS|dkr0|jdjS|dkrM|jdjStddS(s Get the transformation used for drawing x-axis labels, ticks and gridlines. The x-direction is in data coordinates and the y-direction is in axis coordinates. .. note:: This transformation is primarily used by the :class:`~matplotlib.axis.Axis` class, and is meant to be overridden by new kinds of projections that may need to place axis elements in different locations. Rttick1Rttick2Rsunknown value for whichN(RRtget_spine_transformR (R/twhich((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytget_xaxis_transform/s   cC s:|jddtjdd|d|jjddfS(s Get the transformation used for drawing x-axis labels, which will add the given amount of padding (in points) between the axes and the label. The x-direction is in data coordinates and the y-direction is in axis coordinates. Returns a 3-tuple of the form:: (transform, valign, halign) where *valign* and *halign* are requested alignments for the text. .. note:: This transformation is primarily used by the :class:`~matplotlib.axis.Axis` class, and is meant to be overridden by new kinds of projections that may need to place axis elements in different locations. RRiigR@Rtcenter(RRtScaledTranslationtfiguretdpi_scale_trans(R/t pad_points((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytget_xaxis_text1_transformFs cC s6|jddtjd|d|jjddfS(s Get the transformation used for drawing the secondary x-axis labels, which will add the given amount of padding (in points) between the axes and the label. The x-direction is in data coordinates and the y-direction is in axis coordinates. Returns a 3-tuple of the form:: (transform, valign, halign) where *valign* and *halign* are requested alignments for the text. .. note:: This transformation is primarily used by the :class:`~matplotlib.axis.Axis` class, and is meant to be overridden by new kinds of projections that may need to place axis elements in different locations. RRigR@RR(RRRRR(R/R((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytget_xaxis_text2_transform^s cC s]|dkr|jS|dkr0|jdjS|dkrM|jdjStddS(s Get the transformation used for drawing y-axis labels, ticks and gridlines. The x-direction is in axis coordinates and the y-direction is in data coordinates. .. note:: This transformation is primarily used by the :class:`~matplotlib.axis.Axis` class, and is meant to be overridden by new kinds of projections that may need to place axis elements in different locations. RRRRRsunknown value for whichN(RRRR (R/R((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytget_yaxis_transformvs   cC s:|jddtjd|dd|jjddfS(s Get the transformation used for drawing y-axis labels, which will add the given amount of padding (in points) between the axes and the label. The x-direction is in axis coordinates and the y-direction is in data coordinates. Returns a 3-tuple of the form:: (transform, valign, halign) where *valign* and *halign* are requested alignments for the text. .. note:: This transformation is primarily used by the :class:`~matplotlib.axis.Axis` class, and is meant to be overridden by new kinds of projections that may need to place axis elements in different locations. RRigR@iRR(RRRRR(R/R((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytget_yaxis_text1_transforms cC s6|jddtj|dd|jjddfS(s Get the transformation used for drawing the secondary y-axis labels, which will add the given amount of padding (in points) between the axes and the label. The x-direction is in axis coordinates and the y-direction is in data coordinates. Returns a 3-tuple of the form:: (transform, valign, halign) where *valign* and *halign* are requested alignments for the text. .. note:: This transformation is primarily used by the :class:`~matplotlib.axis.Axis` class, and is meant to be overridden by new kinds of projections that may need to place axis elements in different locations. RRgR@iRR(RRRRR(R/R((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytget_yaxis_text2_transforms cC s}|jjtj|jj|jjt|dryx9|jD]+}y|j j WqGt k rqqGXqGWndS(Ntlines( RtsetRRR6t get_transformR7RARt_transformed_patht invalidatetAttributeError(R/RD((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyRs  cC s$|r|jjS|jjSdS(s1Return the a copy of the axes rectangle as a BboxN(RRR(R/toriginal((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt get_positions tbothcC sit|tjs'tjj|}n|dkrF|jj|n|dkre|jj|ndS(s Set the axes position with:: pos = [left, bottom, width, height] in relative 0,1 coords, or *pos* can be a :class:`~matplotlib.transforms.Bbox` There are two position variables: one which is ultimately used, but which may be modified by :meth:`apply_aspect`, and a second which is the starting point for :meth:`apply_aspect`. Optional keyword arguments: *which* ========== ==================== value description ========== ==================== 'active' to change the first 'original' to change the second 'both' to change both ========== ==================== RtactiveRN(RR(Rsoriginal(RRtBboxBaseRRRRR(R/tposR((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt set_positions   cC s)|jdt}|j|dddS(s.Make the original position the active positionRRRN(RR R(R/R((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytreset_positionscC s ||_dS(s set axes_locator ACCEPT : a callable object which takes an axes instance and renderer and returns a bbox. N(t _axes_locator(R/tlocator((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyRscC s|jS(s% return axes_locator (R(R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytget_axes_locatorscC s@|j|j|js/|j|jn|j|dS(s3set the boilerplate props for artists added to axesN(RRtis_transform_sett set_transformRR(R/ta((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt_set_artist_propss cC stjdddS(s[ Returns the patch used to draw the background of the axes. It is also used as the clipping path for any data elements on the axes. In the standard axes, this is a rectangle, but in other projections it may not be. .. note:: Intended to be overridden by new projection types. gg?(gg(Rct Rectangle(R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt_gen_axes_patchs gtinchescC s\itjj|dd6tjj|dd6tjj|dd6tjj|dd6S(sg Returns a dict whose keys are spine names and values are Line2D or Patch instances. Each element is used to draw a spine of the axes. In the standard axes, this is a single line segment, but in other projections it may not be. .. note:: Intended to be overridden by new projection types. RRRR(tmspinestSpinet linear_spine(R/t locationstoffsetR9((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyRs c C s|jj|jjx'|jjD]\}}|jq*Wt|_tjd|_ |j dk r|j jj |j_ |j jj |j_ |j j\}}|j||dtdd|jj|j jjn|jjd|jdk r|jjj |j_ |jjj |j_ |jj\}}|j||dtdd|jj|jjjn|jjdt|_t|_d|_d|_t|_|jt||_t|d|_td|_ g|_!g|_"g|_#g|_$g|_%g|_&d|_'d|_(g|_)|j*|j t+j,d td }t-j.d d|j/j0|_1t2j3ddddddd|dddd|_4|j4j5|j6|j1|j4j7d|j8|j4|j9|_:|_;|j:j<|j/|j:j=|j>|j:j?d|j:j@d|j:j5|j6t|_A|jjB|j:|jjB|j:|jCjD|jEjDdS(sClear the current axest xlim_changedt ylim_changedtemitRtlineariR`s axes.gridtsizesaxes.titlesizegg@gR@RTg?RUg?ttextRtfontpropertiestverticalalignmenttbaselinethorizontalalignmentRRN(R R grqDZ?(FR6RR7Rt iteritemsR tignore_existing_data_limitstcbooktCallbackRegistryRRRtmajortminortget_xlimtset_xlimR t set_scalet get_scaleRtget_ylimtset_ylimt _autoscaleXont _autoscaleYont_xmargint_ymargint_tightRR*t _get_linest_get_patches_for_fillRt_gridOnRtpatchesttextsttablestartiststimagest_current_imagetlegend_t collectionsRt font_managertFontPropertiesRRRRttitleOffsetTranstmtexttTextttitleRRt set_clip_boxRRtpatcht axesPatchRt set_facecolorRt set_edgecolort set_linewidthtaxisont set_clip_pathRtcleanR(R/tnametspinetx0tx1ty0ty1tprops((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyR/s|                        cC stddS(Ns.Axes.frame was removed in favor of Axes.spines(R(R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt get_framescC s|jdS(sclear the axesN(R(R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytclearscC s$|jj||jj|dS(s Set the color cycle for any future plot commands on this Axes. *clist* is a list of mpl color specifiers. N(R$R.R%(R/R(((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyR.scC s|jS(s"return the HOLD status of the axes(R(R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytisholdscC s)|dkr|j |_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/tb((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytholds cC s|jS(N(t_aspect(R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt get_aspectscC s{|dkrd|_n'|dkr0d|_nt||_|dk r[|j|n|dk rw|j|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 'box-forced' same as 'box', but axes can be shared ============ ===================================== 'box' does not allow axes sharing, as this can cause unintended side effect. For cases when sharing axes is fine, use 'box-forced'. *anchor* ===== ===================== value description ===== ===================== 'C' centered 'SW' lower left corner 'S' middle of bottom edge 'SE' lower right corner etc. ===== ===================== tnormalRtequalN(RLsauto(RJRkRtset_adjustableR(R/taspectt adjustabletanchor((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyRs*      cC s|jS(N(R(R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytget_adjustablescC sd|dkrT||jks*||jkrH|dkrHtdqHn||_n tddS(s> ACCEPTS: [ 'box' | 'datalim' | 'box-forced'] RRs box-forceds,adjustable must be "datalim" for shared axess$argument must be "box", or "datalim"N(sboxsdatalims box-forced(RRR R(R/RP((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyRNs   cC s|jS(N(t_anchor(R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt get_anchorscC s_|tjjjks*t|dkr6||_n%tddjtjjjdS(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( RRtcoefstkeysRhRSR RtBBox(R/RQ((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyRs* cC sd|j\}}|j\}}ttj||d}ttj||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_yboundRntmathtfabs(R/txmintxmaxtymintymaxtxsizetysize((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytget_data_ratio s cC s|j\}}|j\}}ttjtj|tj|d}ttjtj|tj|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(RXRYRnRZR[tlog10(R/R\R]R^R_R`Ra((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytget_data_ratio_log0s ..c0C s|d kr!|jdt}n|j}|jdkr|j|j}}|dkrv|dkrvd}q|dkr|dkrd}q|dkr|dks|dkr|dkr|dk rtjd||fd}qqnd}|dkr"|j |ddd S|d kr7d }n|}||j ks[||j kr|j d krd |_ tjdqn|j j\}}||} |j dkr-|dkr||j} n||j} |j} | j| | | } |j | j|j| dd S|j |dd|j\} }|j\}}|dkrtj| tj|} }tj|tj|}}nttj|| d}ttj||d}|j\}}}}| ||} | |}|||d}t|dkr>d S|dkr|j}tj|jtj|j}tj|j tj|j!}d|}d|}n#|j}d|j"}d|j#}||}||}||} ||}!|!|}"| |}#d}$d}%||j ko4||j k}&||j koR||j k}'|&rr|'rrtjdd S|&rt$}(nc||$kr||%kr|#dkr|dkp|"dko|dk})n |dk})|'p|)}(|(rTd||}*|*| d}+|*| d},|dkr>|j%d|+d|,fq|j%|+|,fngd| |}-|-|!d}.|-|!d}/|dkr|j&d|.d|/fn|j&|.|/fd S(sp Use :meth:`_aspect` and :meth:`_adjustable` to modify the axes box or the view limits. RtpolarR tlogRs:aspect is not supported for Axes with xscale=%s, yscale=%sRRNRMiRRs7shared axes: "adjustable" is being changed to "datalim"s box-forcedgKH9g?g{Gzt?g?is9adjustable='datalim' cannot work with shared x and y axesg?g@g$@(sboxs box-forced('RRR RKR>t get_xscalet get_yscaleR%R&RRRRt get_figuretget_size_inchesRdRbRtshrunk_to_aspecttanchoredRTRXRYRZRcRnR[RtabsRRAR@RCRBtwidththeightR t set_yboundt set_xbound(0R/tpositionRORRtaspect_scale_modetAtfigWtfigHt fig_aspectt box_aspecttpbtpb1R\R]R^R_R`RatlRHtwtht data_ratiot y_expandertdLtdL_widtht dL_heighttxrtyrtxmargtymargtYsizetXsizetXmargtYmargtxmtymtchangextchangeytadjust_ytadjytycRBRCtxcR@RA((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt apply_aspect>s              " "   ""                  c O st|dkrt|dr|dj}|dkrK|jn*|dkrd|jn|dkre|jt|jd |jdt |dkr|jdd d qu|dkr|jdd d dd|jt qu|dkr|jdt|jt qu|d kru|jdt|jt |jdd d ddqunt d||j \}}|j \}}||||fSy |dWnt k re|jdt}|jdd}|jdd}|j|||\}}|jdd}|jdd}|j|||\}}||||fSX|d}t|dkrt dn|j|d|dg|j|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` iiRRRMttighttscaledRLRtimageRPRRRQRs-Unrecognized string %s to axis; try on or offR R\R]R^R_is$v must contain [xmin xmax ymin ymax]ii(sequalstightRsnormalsautoRN(RhRtlowert set_axis_ont set_axis_offtset_autoscale_onR Rtautoscale_viewR R RRt IndexErrorRlRRR( R/RrR=R R\R]R^R_R ((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytaxissX"              cC stddS(s[ Return a list of artists the axes contains. .. deprecated:: 0.98 sUse get_children insteadN(R'(R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytget_child_artists scC stjdt|jS(sReturn the axes Rectangle framesuse ax.patch instead(R%R&R'R6(R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyREscC s|jS(sBReturn the legend.Legend instance, or None if no legend is defined(R-(R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt get_legendscC stjd|jS(s2return a list of Axes images contained by the Axest AxesImage(Rt silent_listR+(R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt get_imagesscC stjd|jS(s,Return a list of lines contained by the AxesR[(RRR(R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt get_lines!scC s|jS(sReturn the XAxis instance(R6(R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt get_xaxis%scC stjd|jjS(s2Get the x grid lines as a list of Line2D instancessLine2D xgridline(RRR6t get_gridlines(R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytget_xgridlines)scC stjd|jjS(s1Get the xtick lines as a list of Line2D instancessText xtickline(RRR6t get_ticklines(R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytget_xticklines.scC s|jS(sReturn the YAxis instance(R7(R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt get_yaxis3scC stjd|jjS(s2Get the y grid lines as a list of Line2D instancessLine2D ygridline(RRR7R(R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytget_ygridlines7scC stjd|jjS(s1Get the ytick lines as a list of Line2D instancessLine2D ytickline(RRR7R(R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytget_yticklines;scC swt|tjjr=|jd|jkrjtdqjn-||jkrj||jkrjtdn||_dS(sZ helper for :func:`~matplotlib.pyplot.sci`; do not use elsewhere. is"ContourSet must be in current AxessAArgument must be an image, collection, or ContourSet in this AxesN(Rt matplotlibtcontourt ContourSetR.R R+R,(R/tim((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt_sciAs cC s|jS(sZ helper for :func:`~matplotlib.pyplot.gci`; do not use elsewhere. (R,(R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt_gciOscC s:t|jt|jt|jt|jdkS(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(RhR.R+RR'(R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pythas_dataVs &c sP|jjj|j||jjfd|_|S(sf Add any :class:`~matplotlib.artist.Artist` to the axes. Returns the artist. c sjj|S(N(R*tremove(R}(R/(sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytms(RR*RoRR<R6t_remove_method(R/R((R/sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt add_artistcs   c s|j}|s/|jdtjnjj|j||jdkrq|jj n|r|j rt|j rj |j j qnfd|_|S(s Add a :class:`~matplotlib.collections.Collection` instance to the axes. Returns the collection. s _collection%dc sjj|S(N(R.R(R}(R/(sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyRsN(t get_labelRRhR.RoRt get_clip_pathRR<R6t_pathstupdate_datalimt get_datalimRR(R/t collectiontautolimR((R/sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytadd_collectionps  c sj||jdkr2|jjnj||jsh|jdtj nj j |fd|_ |S(sv Add a :class:`~matplotlib.lines.Line2D` to the list of plot lines Returns the line. s_line%dc sjj|S(N(RR(R}(R/(sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyRsN( RRRR<R6t_update_line_limitsRRRhRRoR(R/RD((R/sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytadd_lines   cC sV|j}|jjdkrR|jj||jd|jd|jt|_ndS(Nitupdatextupdatey( tget_pathtverticesR Rtupdate_from_pathRtx_isdataty_isdataR (R/RDtp((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyRs    c sej||jdkr2|jjnj|jj|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 sjj|S(N(R'R(R}(R/(sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyRsN( RRRR<R6t_update_patch_limitsR'RoR(R/R((R/sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt add_patchs  cC st|tjr0|j s,|j r0dS|jj}|jdkr|jj |}|j |j kr|j |j j }|j |}n|j |d|jd|jndS(s$update the data limits for patch *p*NiRR(RRcRt get_widtht get_heightRRR tget_patch_transformt transformtget_data_transformRtinvertedRRR(R/R6RtxysR((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyRs c sCj|jj||jjfd|_|S(s Add a :class:`~matplotlib.tables.Table` instance to the list of axes tables Returns the table. c sjj|S(N(R)R(R}(R/(sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyRs(RR)RoR<R6R(R/ttab((R/sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt add_tables  cC s_|jjtt|_x|jD]}|j|q#Wx|jD]}|j|qDWdS(s Recompute the data limits based on current artists. At present, :class:`~matplotlib.collections.Collection` instances are not supported. N(RtignoreR RRRR'R(R/RDR((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyRs  cC smt|rt| rdStj|s>tj|}n|jj||jd|d|t |_dS(s@Update the data lim bbox with seq of xy tups or equiv. 2-D arrayNRR( titerableRhRt isMaskedArrayROtasarrayRtupdate_from_data_xyRR (R/RRR((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyRs cC sCt|rt| rdS|jj|||jt|_dS(s,Update the data lim bbox with seq of xy tupsN(RRhRtupdate_from_dataRR (R/RTRU((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytupdate_datalim_numerixscC s)|jjtjj|j|gdS(so Update the datalim to include the given :class:`~matplotlib.transforms.Bbox` *bounds* N(RRRRtunion(R/R((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytupdate_datalim_boundsscC sO|jdks|jdkr"dS|dk rS|jjsS|jj|qSn|dk r|jjs|jj|qn|dk rK|jd|jj}||jjkr|jj||dk r|jj|qn|jd|jj}||jjkrK|jj||dk rH|jj|qHqKndS(sAlook for unit *kwargs* and update the axis instances as necessaryNR4R5(R6RR7t have_unitsRLR8R9R:(R/txdatatydataR=R4R5((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt_process_unit_infos&     cC s|jj|dS(sd return *True* if the given *mouseevent* (in display coords) is in the Axes i(R6tcontains(R/t mouseevent((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytin_axes+scC s|jo|jS(sS Get whether autoscaling is applied for both axes on plot commands (RR (R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytget_autoscale_on2scC s|jS(sT Get whether autoscaling for the x-axis is applied on plot commands (R(R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytget_autoscalex_on8scC s|jS(sT Get whether autoscaling for the y-axis is applied on plot commands (R (R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytget_autoscaley_on>scC s||_||_dS(sl Set whether autoscaling is applied on plot commands accepts: [ *True* | *False* ] N(RR (R/RH((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyRDs cC s ||_dS(s{ Set whether autoscaling for the x-axis is applied on plot commands accepts: [ *True* | *False* ] N(R(R/RH((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytset_autoscalex_onMscC s ||_dS(s{ Set whether autoscaling for the y-axis is applied on plot commands accepts: [ *True* | *False* ] N(R (R/RH((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytset_autoscaley_onUscC s4|dks|dkr'tdn||_dS(s Set padding of X data limits prior to autoscaling. *m* times the data interval will be added to each end of that interval before it is used in autoscaling. accepts: float in range 0 to 1 iismargin must be in range 0 to 1N(R R!(R/tm((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt set_xmargin]s cC s4|dks|dkr'tdn||_dS(s Set padding of Y data limits prior to autoscaling. *m* times the data interval will be added to each end of that interval before it is used in autoscaling. accepts: float in range 0 to 1 iismargin must be in range 0 to 1N(R R"(R/R((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt set_ymarginjs cO s| r| r|j|jfS|jdt}|jdd }|jdd }t|dkrw|d}}n-t|dkr|\}}n td|d k r|j|n|d k r|j|n|d k }|d k }|j d|d|d |d S( s@ Convenience method to set or retrieve autoscaling margins. signatures:: margins() returns xmargin, ymargin :: margins(margin) margins(xmargin, ymargin) margins(x=xmargin, y=ymargin) margins(..., tight=False) All three forms above set the xmargin and ymargin parameters. All keyword parameters are optional. A single argument specifies both xmargin and ymargin. The *tight* parameter is passed to :meth:`autoscale_view`, which is executed after a margin is changed; the default here is *True*, on the assumption that when margins are specified, no additional padding to match tick marks is usually desired. Setting *tight* to *None* will preserve the previous setting. Specifying any margin changes only the autoscaling; for example, if *xmargin* is not None, then *xmargin* times the X data interval will be added to each end of that interval before it is used in autoscaling. RRTRUiiis%more than two arguments were suppliedtscalextscaleyN( R!R"R8R RRhR RRR(R/R<R\RtmxtmyRR((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytmarginsxs"#     cC s ||_dS(sI Set zorder value below which artists will be rasterized N(R(R/tz((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytset_rasterization_zorderscC s|jS(sI Get zorder value below which artists will be rasterized (R(R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytget_rasterization_zorderscC s|dkrt}t}nZt}t}|dkrNt||_|j}n|d krut||_|j}n|jd|d|d|dS( s Convenience method for simple axis view autoscaling. It turns autoscaling on or off, and then, if autoscaling for either axis is on, it performs the autoscaling on the specified axis or axes. *enable*: [True | False | None] True (default) turns autoscaling on, False turns it off. None leaves the autoscaling state unchanged. *axis*: ['x' | 'y' | 'both'] which axis to operate on; default is 'both' *tight*: [True | False | None] If True, set view limits to data limits; if False, let the locator and margins expand the view limits; if None, use tight scaling if the only artist is an image, otherwise treat *tight* as False. The *tight* setting is retained for future autoscaling until it is explicitly changed. Returns None. RTRRURRRN(RTsboth(RUsboth(RR R tboolRR R(R/tenableRRRR((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt autoscales      c C s|dkrW|jpQt|jdkoQt|jdkoQt|jdk}nt|}|_|r|jr|jj |}g|D]}|j ^q}t j j |}|j\} } |jj} y| j| | \} } Wn5tk r*t j| | dtdd\} } nX|jdkrb| | |j} | | 8} | | 7} n|s| j| | \} } n|j| | n|r|jr|jj |} g| D]}|j ^q}t j j |}|j\}}|jj}y|j||\}}Wn5tk rVt j||dtdd\}}nX|jdkr|||j} || 8}|| 7}n|s|j||\}}n|j||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. The data limits are not updated automatically when artist data are changed after the artist has been added to an Axes instance. In that case, use :meth:`matplotlib.axes.Axes.relim` prior to calling autoscale_view. it increasingtexpanderg?N(RR#RhR+RR'RRRt get_siblingsRRRRt intervalxR6tget_major_locatort nonsingularRR R!t view_limitsRqR Rt intervalyR7R"Rp(R/RRRR#txsharedtaxtdltbbR@RAtxlocatortdeltatysharedRBRCtylocator((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyRsR       c C s,|dkr|j}n|dkr3tdn|jsCdS|jd|j}|r|||}|j|n |jg}|j|j|j|j |j|j |j|j |j|j |j rY| rY|jr|jjd|jjdn |jjd|jjd|j|j|jgn|sr|j|jn|j|j|jdk r|j|jn|j r|jr|j|jjng|D]!}|js|j|f^q}t|jdks|jrS|jg|jD]}|j|f^q.t} nt} |j dt!d|j"} t|dkr|dd| kr|j#g|D]} | d| kr| ^q} g|D]} | d| kr| ^q}ng} |j r(|jr(|j$j%|n| rg|jD]!}|jr8|j|f^q8} | j dd |j&}g| D]$\}}|j'|ddf^q}|j(j)\} }}}|t*|dt*| d}|t*|dt*|d}t+j,|||}t|_-|j(j.\} }}}|j/}|j0|j(|j1t2j3|j$j4|j$j5|j6|t*| t*|||j7n| rx!| D]\}}|j%|qW|j8nx!|D]\}}|j%|qW|j9d||_dS( s*Draw everything (plot lines, axes, labels)sNo renderer definedNR,g?g@iREicS s|dS(Ni((RT((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyRys(:RRt RuntimeErrort get_visiblet open_groupRRtextendR.R'RR(R*R;RR6t set_zorderR7RoR4R)R-RRt itervaluest get_animatedtzorderRhR+toption_image_nocompositeR R tsortRRtstart_rasterizingR6tdrawtget_image_magnificationt make_imageRtextentstroundtmimaget from_imagest is_grayscaleRtnew_gctset_clip_rectangleR<RtTransformedPathRRt draw_imagetrestoretstop_rasterizingt close_group(R/trenderertinframeRRR*RtdsuRt _do_compositetrasterization_zorderR{tdsu_rasterizedt zorder_imagestmagRtimsRHtrttRnRoR|R}tgcR((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyR%s         !!,  & ),! 1""      "   cC s|j|jdS(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(RR(R/R((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt draw_artistscC s|j|jdtdS(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 (R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytredraw_in_framescC s|jS(N(R(R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytget_renderer_cachescC s|jdkrtdng|jjD]}|j|f^q.}|jdd|j}|jx!|D]\}}|j|qvWdS(NsYou must first call ax.draw()REcS s|dS(Ni((RT((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyRs( t _lastRendererRRtanimatedRVRRtblitR(R/RR#R!ttmp((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt__draw_animates+  cC s|jS(s? Get whether the axes rectangle patch is drawn (R(R/((sB/opt/alt/python27/lib64/python2.7/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/RH((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt set_frame_onscC s|jS(s7 Get whether axis below is true or not (R(R/((sB/opt/alt/python27/lib64/python2.7/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/RH((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt set_axisbelowsRcK sWt|rt}nt|}|jj|d|||jj|d||dS(s call signature:: grid(self, b=None, which='major', **kwargs) Set the axes grids on or off; *b* is a boolean. (For MATLAB compatibility, *b* may also be a string, 'on' or 'off'.) 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*. *which* can be 'major' (default), 'minor', or 'both' to control whether major tick grids, minor tick grids, or both are affected. *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 RN(RhR R R6RR7(R/RHRR=((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyRs    c K s|jddj}|jdd}|jdd}|jddj}|dk ry|\}}||dWqttfk rtdqXn|d d krt}nW|dkrt}|d krt} qt} td n|dkr d}n tdyW|dk r|dks<|dkrU|jj j j |n|dksm|dkr|j j j j |qn|dk r|dks|dkr|jj j j |n|dks|dkr|j j j j |qn|dk rk|dks|dkr7|jj j j|n|dksO|dkrk|j j j j|qknWntk rtdnXdS(sw 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. *useOffset* [True | False | offset]; if True, the offset will be calculated as needed; if False, no offset will be used; if a numeric offset is specified, it will be used. *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 scilimitst useOffsetRRis*scilimits must be a sequence of 2 integersitscitplaintcommascomma style remains to be addeds%s is not a valid style valueRTRUs0This method only works with the ScalarFormatter.N(R=R>(R8RRR RBR R tNotImplementedErrorR6Rt formattertset_scientificR7tset_powerlimitst set_useOffsetR( R/R=R9R:R;RRtntsbtcb((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytticklabel_formatsP                cK sv|dk}|d k}|r7|jjj|n|rV|jjj|n|jd|d|d|dS( s Convenience method for controlling tick locators. Keyword arguments: *axis* ['x' | 'y' | 'both'] Axis on which to operate; default is 'both'. *tight* [True | False | None] Parameter passed to :meth:`autoscale_view`. Default is None, for no change. Remaining keyword arguments are passed to directly to the :meth:`~matplotlib.ticker.MaxNLocator.set_params` method. Typically one might want to reduce the maximum number of ticks and use tight bounds when plotting small subplots, for example:: ax.locator_params(tight=True, nbins=4) Because the locator is involved in autoscaling, :meth:`autoscale_view` is called automatically after the parameters are changed. This presently works only for the :class:`~matplotlib.ticker.MaxNLocator` used by default on linear axes, but it may be generalized. RTRRURRRN(RTsboth(RUsboth(R6Rt set_paramsR7R(R/RRR=t_xt_y((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytlocator_paramsGs  cK s|d krkt|}|jdd |jdd |jdd |jdd |jj|n|dkrt|}|jdd |jd d |jd d |jd d |jj|nd S(s Convenience method for changing the appearance of ticks and tick labels. Keyword arguments: *axis* ['x' | 'y' | 'both'] Axis on which to operate; default is 'both'. *reset* [True | False] If *True*, set all parameters to defaults before processing other keyword arguments. Default is *False*. *which* ['major' | 'minor' | 'both'] Default is 'major': apply arguments to major ticks only. *direction* ['in' | 'out'] Puts ticks inside or outside the axes. *length* Tick length in points. *width* Tick width in points. *color* Tick color; accepts any mpl color spec. *pad* Distance in points between tick and label. *labelsize* Tick label font size in points or as a string (e.g. 'large'). *labelcolor* Tick label color; mpl color spec. *colors* Changes the tick color and the label color to the same value: mpl color spec. *zorder* Tick and label zorder. *bottom*, *top*, *left*, *right* Boolean or ['on' | 'off'], controls whether to draw the respective ticks. *labelbottom*, *labeltop*, *labelleft*, *labelright* Boolean or ['on' | 'off'], controls whether to draw the respective tick labels. Example:: ax.tick_params(direction='out', length=6, width=2, colors='r') This will make all major ticks be red, pointing out of the box, and with dimensions 6 points by 2 points. Tick labels will also be red. RTRRRt labelleftt labelrightRURRtlabeltopt labelbottomN(RTsboth(RUsboth(tdictR8RR6tset_tick_paramsR7(R/RR=txkwtykw((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt tick_paramsnsA    cC s t|_dS(sturn off the axisN(R R;(R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyRscC s t|_dS(sturn on the axisN(R R;(R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyRscC s|jS(s Return the axis background color(R(R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytget_axis_bgcolorscC s||_|jj|dS(s set the axes background color ACCEPTS: any matplotlib color - see :func:`~matplotlib.pyplot.colors` N(RR6R8(R/R ((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytset_axis_bgcolors cC s&|j\}}|j||dS(sInvert the x-axis.N(RR(R/RR((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt invert_xaxisscC s|j\}}||kS(s'Returns True if the x-axis is inverted.(R(R/RR((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytxaxis_invertedscC s6|j\}}||kr(||fS||fSdS(sa Returns the x-axis numerical bounds where:: lowerBound < upperBound N(R(R/RR((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyRXs  cC s|dkr't|r'|\}}n|j\}}|dkrN|}n|dkrc|}n|jr||kr|j||ddq|j||ddn;||kr|j||ddn|j||dddS(s Set the lower and upper numerical bounds of the x-axis. This method will honor axes inversion regardless of parameter order. It will not change the _autoscaleXon attribute. RN(RRRXRXR(R/Rtuppert old_lowert old_upper((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyRqs     cC st|jjS(s8 Get the x-axis range [*left*, *right*] (R~RR(R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyR sc K sOd|kr|jd}nd|kr<|jd}n|r[td|jn|d krt|r|\}}n|jd||f|d k r|j|}n|d k r|j|}n|j\}}|d kr|}n|d kr|}n||kr>tj ddd||fnt j ||dt \}}|j j||\}}||f|j_|d k rt||_n|rE|jjd |x|jj|D]k}||k r|j|jjd t d ||j|jkr>|jjd k r>|jjjq>qqWn||fS( s call signature:: set_xlim(self, *args, **kwargs): Set the data limits for the xaxis Examples:: set_xlim((left, right)) set_xlim(left, right) set_xlim(left=1) # right unchanged set_xlim(right=1) # left unchanged Keyword arguments: *left*: scalar the left xlim; *xmin*, the previous name, may still be used *right*: scalar the right xlim; *xmax*, the previous name, may still be used *emit*: [ True | False ] notify observers of lim change *auto*: [ True | False | None ] turn *x* autoscaling on (True), off (False; default), or leave unchanged (None) Note: the *left* (formerly *xmin*) value may be greater than the *right* (formerly *xmax*). For example, suppose *x* is years before present. Then one might use:: set_ylim(5000, 0) so 5000 years ago is on the left of the plot and the present is on the right. Returns the current xlimits as a length 2 tuple ACCEPTS: len(2) sequence of floats R\R]sunrecognized kwargs: %sRs0Attempting to set identical left==right results s6in singular transformations; automatically expanding. sleft=%s, right=%sRR R RN(R8R RVRRRRMRR%R&RRR R6tlimit_range_for_scaleRRRRRtprocessRRRRtcanvast draw_idle( R/RRR RR\told_leftt old_righttother((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyR sH)          cC s$ddjtj|jjS(Ns!return the xaxis scale string: %ss, (RRRR6R(R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyRgb scK s1|jj|||jdt|jdS(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 RN(R6RRR R(R/tvalueR=((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyRg scC s|jjd|S(s)Return the x ticks as a list of locationsR(R6t get_ticklocs(R/R((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt get_xticksy scC s|jj|d|S(s[ Set the x ticks with list of *ticks* ACCEPTS: sequence of floats R(R6t set_ticks(R/tticksR((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt set_xticks} scC stjd|jjS(s0Get the xtick labels as a list of Text instancessText xticklabel(RRR6tget_majorticklabels(R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytget_xmajorticklabels s cC stjd|jjS(s0Get the xtick labels as a list of Text instancessText xticklabel(RRR6tget_minorticklabels(R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytget_xminorticklabels s cC stjd|jjd|S(s0Get the xtick labels as a list of Text instancessText xticklabelR(RRR6tget_ticklabels(R/R((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytget_xticklabels s cK s|jj||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(R6tset_ticklabels(R/tlabelstfontdictRR=((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytset_xticklabels scC s&|j\}}|j||dS(sInvert the y-axis.N(RR(R/RR((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt invert_yaxis scC s|j\}}||kS(s'Returns True if the y-axis is inverted.(R(R/RR((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytyaxis_inverted scC s6|j\}}||kr(||fS||fSdS(sEReturn y-axis numerical bounds in the form of lowerBound < upperBoundN(R(R/RR((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyRY s  cC s|dkr't|r'|\}}n|j\}}|dkrN|}n|dkrc|}n|jr||kr|j||ddq|j||ddn;||kr|j||ddn|j||dddS(sSet the lower and upper numerical bounds of the y-axis. This method will honor axes inversion regardless of parameter order. It will not change the _autoscaleYon attribute. RN(RRRYRtR(R/RRYRZR[((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyRp s     cC st|jjS(s8 Get the y-axis range [*bottom*, *top*] (R~RR(R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyR sc K s9d|kr|jd}nd|kr<|jd}n|r[td|jn|d krt|r|\}}n|d k r|j|}n|d k r|j|}n|j\}}|d kr|}n|d kr|}n||kr(tjddd||fnt j ||dt \}}|j j ||\}}||f|j_|d k rt||_n|r/|jjd|x|jj|D]k}||k r|j|jjd t d ||j|jkr(|jjd k r(|jjjq(qqWn||fS( s call signature:: set_ylim(self, *args, **kwargs): Set the data limits for the yaxis Examples:: set_ylim((bottom, top)) set_ylim(bottom, top) set_ylim(bottom=1) # top unchanged set_ylim(top=1) # bottom unchanged Keyword arguments: *bottom*: scalar the bottom ylim; the previous name, *ymin*, may still be used *top*: scalar the top ylim; the previous name, *ymax*, may still be used *emit*: [ True | False ] notify observers of lim change *auto*: [ True | False | None ] turn *y* autoscaling on (True), off (False; default), or leave unchanged (None) Note: the *bottom* (formerly *ymin*) value may be greater than the *top* (formerly *ymax*). For example, suppose *y* is depth in the ocean. Then one might use:: set_ylim(5000, 0) so 5000 m depth is at the bottom of the plot and the surface, 0 m, is at the top. Returns the current ylimits as a length 2 tuple ACCEPTS: len(2) sequence of floats R^R_sunrecognized kwargs: %ss0Attempting to set identical bottom==top results s6in singular transformations; automatically expanding. sbottom=%s, top=%sRR R RN(R8R RVRRRNRR%R&RRR R7R\RRRR RR]RRRRR^R_( R/RRR RR\t old_bottomtold_topRb((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyR sF)          cC s$ddjtj|jjS(Ns!return the xaxis scale string: %ss, (RRRR7R(R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyRh- scK s1|jj|||jdt|jdS(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 RN(R7RRR R(R/RcR=((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyR2 scC s|jjd|S(s)Return the y ticks as a list of locationsR(R7Rd(R/R((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt get_yticksD scC s|jj|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(R7Rf(R/RgR((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt set_yticksH s cC stjd|jjS(s0Get the xtick labels as a list of Text instancessText yticklabel(RRR7Ri(R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytget_ymajorticklabelsU s cC stjd|jjS(s0Get the xtick labels as a list of Text instancessText yticklabel(RRR7Rk(R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytget_yminorticklabelsZ s cC stjd|jjd|S(s0Get the xtick labels as a list of Text instancessText yticklabelR(RRR7Rm(R/R((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytget_yticklabels_ s cK s|jj||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(R7Ro(R/RpRqRR=((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytset_yticklabelsd scC s|jj|dS(sSets up x-axis ticks and labels that treat the x data as dates. *tz* is a timezone string or :class:`tzinfo` instance. Defaults to rc value. N(R6t axis_date(R/ttz((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt xaxis_datew scC s|jj|dS(sSets up y-axis ticks and labels that treat the y data as dates. *tz* is a timezone string or :class:`tzinfo` instance. Defaults to rc value. N(R7R}(R/R~((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt yaxis_date scC sHy|j|SWn0tk rC|jjj}||}|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(RRBR6tget_major_formattertformat_data_short(R/RTRHRF((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt format_xdata s   cC sHy|j|SWn0tk rC|jjj}||}|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(RRBR7RR(R/RURHRF((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt format_ydata s   cC sV|dkrd}n|j|}|dkr9d}n|j|}d||fS(s4return a format string formatting the *x*, *y* coords???s x=%s y=%sN(RRR(R/RTRUtxstys((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt format_coord s    cC stS(sA Return *True* if this axes support the zoom box (R (R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytcan_zoom scC s|jS(sF Get whether the axes responds to navigation commands (t _navigate(R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt get_navigate scC s ||_dS(sq Set whether the axes responds to navigation toolbar commands ACCEPTS: [ True | False ] N(R(R/RH((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyR scC s|jS(sR Get the navigation toolbar button status: 'PAN', 'ZOOM', or None (t_navigate_mode(R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytget_navigate_mode scC s ||_dS(s Set the navigation toolbar button status; .. warning:: this is not a user-API function. N(R(R/RH((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyR sc C satjd|jjd|jjd|jjjd|jjd|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_inverseRRTRUN(RtBunchRRRRRt _pan_start(R/RTRUtbutton((sB/opt/alt/python27/lib64/python2.7/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/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytend_pan scC sd}|j}||j}||j}|dkrH|dkrHdS|dkr||||\}}|jj| | j|j} n|dkry| t|jj}| t|jj }||||\}}|j dkrd||}|}nt j d||f} t j |j|jg} |jj|j} | | | | } tj| j|j} Wqtk rtjd dSXn|j| j|j| jdS( 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|dkr6t|t|kr-|}q|}n|dkrKd}n|dkr`d}n|dkrdt|t|krd}qdt|t|krd}qt|t|kr|t|t|}q|t|t|}n||fS(NtcontrolRTiRUtshifti(Rm(REtdxtdy((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt format_deltas s"          iNiiRg?g$@sOverflow while panning(RRTRURt translatedt transformedRRkRnRoRKROtpowertarrayRRRRt OverflowErrorR%R&RRRR(R/RRERTRURRRRtresulttalphatstartt oldpointst newpoints((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytdrag_pan s:         cC s|jS(s return the cursor propertiess as a (*linewidth*, *color*) tuple, where *linewidth* is a float and *color* is an RGBA tuple (t _cursorProps(R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytget_cursor_props9 scG swt|dkr%|d\}}n-t|dkrF|\}}n tdtjj|}||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(RhR RRtto_rgbaR(R/R<tlwR"((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyRA 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/R RH((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyRV scC stddS(sdisconnect from the Axes event.s3use the callbacks CallbackRegistry instance insteadN(R'(R/tcid((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt disconnecti scC sg}|j|j|j|j|j|j|j|j|j|j|j|j|j|j|j|j |j dk r|j|j n|j|j |j|j |j|j|j|jj|S(sreturn a list of child artistsN(RoR6R7R RR'R(R)R*R+R-RR.R4R6RR (R/tchildren((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt get_childrenn s cC s/t|jr|j||S|jj|S(sSTest whether the mouse event occured in the axes. Returns T/F, {} (tcallablet _containsR6R(R/R((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyR scC s|jj|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. (R6tcontains_point(R/tpoint((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyR scG s<t|dkr!tdntjj||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(RhR'RRtpick(R/R<((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyR s c  sH|dk r$|j||fn ||fd}dfd}|j|j|j}t|rtt|}ntt|rt g|D]}|df^q} g|D]} | | kr| ^q}n|dkrn t dt |s dSg|D]} || | f^q} | j | 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|\}}|\}}tj||d||dS(s&return the distance between two pointsi(RZtsqrt(tp1tp2RARCtx2ty2((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt dist_points s  cS s3|\}}ttj||d||dS(s@*x* and *y* are arrays; return the distance to the closest pointi(tminROR(RRTRURARC((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytdist_x_y s c  s=t|tr|j}|j\}}}}||f|||f||||f|||ff}t|\}}nt|tr|j} |jj| } t| \}}nWt|t j r|j dt } |j dt } |jj| | \}}ntj|tj|S(Ntorig(RR3RRRitPatchRRttransform_pathRR[t get_xdataR t get_ydatat numerix_x_yROR( RRR{RHR|R}tvertstxttyttpathttvertsRR(Rtxywin(sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytdist s : !is"among must be callable or iterableiN( Rttransform_pointRR'R(RtfilterttestRRPR RhR( R/RTRURtamongRRR*RqtamongdRtds((RRsB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt__pick s(      %(   % cC s |jjS(s, Get the title text string. (R4tget_text(R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt get_title scK suitdd6dd6dd6}|jj||jj||dk r^|jj|n|jj||jS(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(RR4tset_texttupdateR(R/RRqR=tdefault((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt set_title s   cC s|jj}|jS(s- Get the xlabel text string. (R6RR(R/R((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt get_xlabel scK s1|dk r||j_n|jj|||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(RR6tlabelpadtset_label_text(R/txlabelRqRR=((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt set_xlabel s cC s|jj}|jS(s- Get the ylabel text string. (R7RR(R/R((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt get_ylabel) scK s1|dk r||j_n|jj|||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(RR7RR(R/tylabelRqRR=((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt set_ylabel0 s c  sidd6dd6jd6}|rEtjd|d|d|}ntjd|d|d|}j||j||d k r|j|n|j|jj|fd |_ d |kr|j j 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 RRRRRRTRURc sjj|S(N(R(R(R}(R/(sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyR stclip_onN( RR2t TextWithDashR3RRRR(RoRR5R( R/RTRUR RqtwithdashR=RR+((R/sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyRG s&0        c sztj||}|jtjj||jdrT|jjnj j |fd|_ |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 Rc sjj|S(N(R(R(R}(R/(sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyR s( R2t AnnotationRRRRthas_keyR<R6R(RoR(R/R<R=R((R/sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytannotate s iic K sd|krtddn|j\}}|jd|d||j|}||kpk||k}tj|j|j} tj ||g||gd| |} t | _ |j | |j dt d|| S(sA 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, with the exception of 'transform': %(Line2D)s .. seealso:: :meth:`axhspan` for example plot and source code Rs&'transform' is not allowed as a kwarg;s$axhline generates its own transform.RR=RR(R RYRRNRRRRRR[R RRR( R/RUR\R]R=R^R_tyyRRR{((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytaxhline s-  '  c K sd|krtddn|j\}}|jd|d||j|}||kpk||k}tj|j|j} tj ||g||gd| |} t | _ |j | |j d|dt | S(s9 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, with the exception of 'transform': %(Line2D)s .. seealso:: :meth:`axhspan` for example plot and source code Rs&'transform' is not allowed as a kwarg;s$axvline generates its own transform.RR=RR(R RXRRMRRRRRR[R RRR( R/RTR^R_R=R\R]txxRRR{((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytaxvline s-  '  c K stj|j|j}|j||g||gd||j||g\}}|j||g\}}||f||f||f||ff}tj||}|j |t |_ |j ||j 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(RRRRRRMRNRcRdRR RRR( R/R^R_R\R]R=RRR((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytaxhspan2 s'"*   c K stj|j|j}|j||g||gd||j||g\}}|j||g\}}||f||f||f||fg}tj||}|j |t |_ |j ||j 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(RRRRRRMRNRcRdRR RRR( R/R\R]R^R_R=RRR((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytaxvspank s'"*   RqtsolidcK sz|jdd k r$tdn|j||g|d||j|}|j|}|j|}t|s|g}nt|s|g}nt|s|g}ntj|}tj|}tj|}t |dkr tj ||j }nt |dkr6tj ||j }nt |t |krZt dnt |t |kr~t dngt |||D]'\}} } || f| | ff^q} tj| d|d|d |} |j| | j|t|j|j} t|j|j}|j}|j}| |f||ff}|j||j| 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(RlRR'RRNRMRRORRhtresizeRQR RitmcolltLineCollectionRRRRnRR(R/RUR\R]RRRR=tthisxmintthisxmaxtthisyRtcolltminxtmaxxtminytmaxytcorners((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pythlines sJ$     =      cK s|jdd k r$tdn|jd|d||gd||j|}|j|}|j|}t|s|g}nt|s|g}nt|s|g}ntj|}tj|}tj|}t |dkrtj ||j }nt |dkr<tj ||j }nt |t |kr`t dnt |t |krt dntj ||gj}gt||D]*\} \} } | | f| | ff^q} tj| d |d |d |} |j| | j|t|}t|}tt|t|}tt|t|}||f||ff}|j||j| 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(RlRR'RRMRNRRORRhRRQR RtTRiRRRRRRnRR(R/RTR^R_RRRR=tYtthisxtthisymintthisymaxRRRRRRR((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytvlines sL"     =      cO s|jdt}|jdt}|js:|jng}x4|j||D] }|j||j|qSW|jd|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(R8R RRR$RRoR(R/R<R=RRRRD((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyR+Lsw  tboc K sh|js|jn|j||||}|rD|j|n|rZ|j|n|j|S(sb 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 | :class:`tzinfo` instance] 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+RRR( R/RTRURR~txdatetydateR=R>((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt plot_dates:  cO s|js|jni|jddd6|jdd d6|jddd6}i|jddd6|jdd d6|jddd6}|jd ||jd ||j}t|_|j||}||_|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 tsubsxtnonposxtmasktbaseytsubsytnonposyRfN(RRR8RRRR R+(R/R<R=RRRHR{((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytloglogs'    cO s|js|jni|jddd6|jddd6|jddd6}|jd||jd|j}t|_|j||}||_|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 RRRRfR N(RRR8RRRR R+(R/R<R=tdRHR{((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytsemilogxUs&     cO s|js|jni|jddd6|jddd6|jddd6}|jd||jd|j}t|_|j||}||_|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 RRRRfR N(RRR8RRRR R+(R/R<R=R RHR{((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytsemilogys&     cK s|j|||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/RTR=((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytacorrs=i c K st|}|t|kr-tdn|tj|}|tj|}tj||dd} |r| tjtj||tj||} n|d kr|d}n||ks|dkrtd|ntj| |d} | |d|||!} |rN|j | dg| |} |j |} n>|j dd|j d d |j | | |\} d } | | | | fS( s call signature:: def xcorr(self, x, y, normed=True, detrend=mlab.detrend_none, usevlines=True, maxlags=10, **kwargs): Plot the cross correlation between *x* and *y*. If *normed* = *True*, normalize the data by the cross correlation at 0-th lag. *x* and y are detrended by the *detrend* callable (default no normalization). *x* and *y* must be equal length. 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 :func:`~matplotlib.pyplot.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*: :func:`~matplotlib.pyplot.vlines` rather than :func:`~matplotlib.pyplot.plot` is used to draw vertical lines from the origin to the xcorr. Otherwise the plotstyle is determined by the kwargs, which are :class:`~matplotlib.lines.Line2D` properties. The return value is a tuple (*lags*, *c*, *linecol*, *b*) where *linecol* is the :class:`matplotlib.collections.LineCollection` instance and *b* is the *x*-axis. *maxlags* is a positive integer detailing the number of lags to show. The default value of *None* will return all ``(2*len(x)-1)`` lags. **Example:** :func:`~matplotlib.pyplot.xcorr` above, and :func:`~matplotlib.pyplot.acorr` below. **Example:** .. plot:: mpl_examples/pylab_examples/xcorr_demo.py sx and y must be equal lengthtmodeiis.maglags must be None or strictly positive < %diRtoRRN( RhR RORt correlateRtdotRRjRRt setdefaultR+( R/RTRUtnormedtdetrendt usevlinestmaxlagsR=tNxR"tlagsRRH((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyR s.8 2  cC s|j}|j|j|jg|jD]}t|tjr*|^q*|jg|jD]}t|tjr_|^q_|jg|jD]}t|tjr|^q|S(s6return artists that will be used as handles for legend( RR R'R.RRRtRegularPolyCollectiontCircleCollection(R/thandlesR"((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt_get_legend_handlesUs cC s~g}g}xe|jD]W}|j}|dk r|dkr|jd r|j||j|qqW||fS(s return handles and labels for legend ax.legend() is equivalent to :: h, l = ax.get_legend_handles_labels() ax.legend(h, l) Rt_N(RRRt startswithRo(R/RRpthandleR((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytget_legend_handles_labelsbs    cO st|dkrJ|j\}}t|dkr\tjddSnt|dkr|d}gt|j|D]\}}|^q|}nt|dkr"t|dst|dt r|\}}gt|j|D]\}}|^q}||d|^q>}||fS(so return xs[mask], ys[mask] where mask is True but xs and ys are not arrays (Ri(RRRRRHR((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytxywhere%s..iitmstmarkeredgewidthtmewitlsRRsk|tk_N(RRRR RRRhR+RORRRRR\RoRtanyR Rt CARETLEFTt CARETRIGHTRt CARETDOWNtCARETUPR$R3RZt get_colort set_colorR(&R/RTRUR/R.RR1t elinewidthR2t barsabovetlolimstuplimstxlolimstxuplimsR=RHtl0tbarcolstcaplinestlines_kwRutplot_kwRtthiserrRRtleftlotylotrightuptyupRRRYtxlotlowerlotxuptupperupR{((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyR>sW                 " " " "        03,,  " "%  03,,  " "%      sb+g?c 8  s!jsjnj} gggggf\} } } }}t|dr-t|jdkrt|ddrt|}q*|g}q-t|jdkr!|j\}}|dkr|g}q*|dkr|jg}q*gt|D]}|dd|f^q}q-tdnt|ddsL|g}nt|}|dkrzt d|d}n|dkrt |t |}t dt |d d }nt |tst |trtj|ft|}njtxt|D]s\}}tj||}t|}|dkrLqntj|d d d g\}}}||}|||}tj||k|}t|dkr|}n t |}|||}tj||k|}t|dkr|}n t |}g} g}!g}"g}#t|dkrtj||k|} tj||k|}!tj| jd|}"tj|!jd|}#n|||d }$|||d }%tjd|}&|||d}'|||d}(|'|(g})||g}*|dkr]|$|%|%|$|$g}+|||||g},|$|%g}-n| dk rdd}.|.|d| }/|/d}0|/d}1n6|d|tj|}0|d|tj|}1|$|%|%|(|%|%|$|$|'|$|$g }+|||1||0|||0||1|g },|'|(g}-||g}*dfd|r|fd}2fd}3nfd}2fd}3|rd}4nd}4| j|2|&||gd|&||gd| j|2|)||gd|)||gd|r*| j|3|+|,n| j|2|+|,d|j|2|-|*|4d|j|2|"| ||#|!|qWd|krjj}5}6njj}5}6t |d t |d f}7|6|7|5|j| td| d | d!| d"|d#|S($s call signature:: boxplot(x, notch=0, sym='+', vert=1, whis=1.5, positions=None, widths=None, patch_artist=False) Make a box and whisker plot for each column of *x* or each vector in sequence *x*. The box extends from the lower to upper quartile values of the data, with a line at the median. The whiskers extend from the box to show the range of the data. Flier points are those past the end of the whiskers. *x* is an array or a sequence of vectors. - *notch* = 0 (default) produces a rectangular box plot. - *notch* = 1 will produce a notched box plot *sym* (default 'b+') is the default symbol for flier points. Enter an empty string ('') if you don't want to show fliers. - *vert* = 1 (default) makes the boxes vertical. - *vert* = 0 makes horizontal boxes. This seems goofy, but that's how MATLAB did it. *whis* (default 1.5) defines the length of the whiskers as a function of the inner quartile range. They extend to the most extreme data point within ( ``whis*(75%-25%)`` ) data range. *bootstrap* (default None) specifies whether to bootstrap the confidence intervals around the median for notched boxplots. If bootstrap==None, no bootstrapping is performed, and notches are calculated using a Gaussian-based asymptotic approximation (see McGill, R., Tukey, J.W., and Larsen, W.A., 1978, and Kendall and Stuart, 1967). Otherwise, bootstrap specifies the number of times to bootstrap the median to determine it's 95% confidence intervals. Values between 1000 and 10000 are recommended. *positions* (default 1,2,...,n) sets the horizontal positions of the boxes. The ticks and limits are automatically set to match the positions. *widths* is either a scalar or a vector and sets the width of each box. The default is 0.5, or ``0.15*(distance between extreme positions)`` if that is smaller. - *patch_artist* = False (default) produces boxes with the Line2D artist - *patch_artist* = True produces boxes with the Patch artist Returns a dictionary mapping each component of the boxplot to a list of the :class:`matplotlib.lines.Line2D` instances created. **Example:** .. plot:: pyplots/boxplot_demo.py RQiiiNs*input x can have no more than 2 dimensionst__len__g333333?g?g?ii2iKg?ic S st|}ddg}tj|}xPt|D]B}tjjd|d|}||}tj|d||'`` triangle right ``'v'`` triangle down ``'<'`` triangle left ``'d'`` diamond ``'p'`` pentagon ``'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 or None 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*: The string 'none' to plot faces with no outlines *facecolors*: The string '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@iR iRt^g@t>Rrt|5|sU |5S|dkry t j?t|}nfd}9t j@|||}:|9|||:};t j|;}<gg}=}>xtA|;D]\}.}?|:|.}@|.t|:d kr|:|.d }An|@t jB|:d}A|<|.s=q n|=j |@df|@df|Adf|Adfg|>j |?q Wt j |>}>tCjD|j)|jE}Bt'j(|=d |Bddj4|>j5| j6| j7| j8||j>t j@|||}:|9|||:}Ct j|C}<gg}=}>xtA|CD]\}.}?|:|.}@|.t|:d kr|:|.d }An|@t jB|:d}A|<|.sq`n|=j d|@fd|Afd|Afd|@fg|>j |?q`Wt j |>}>tCjD|jE|j)}Bt'j(|=d |Bddj4|>j5| j6| j7| j8||j>|5_F|5_Gfd!}D|5jHjId"|D|5S(#sN call signature:: hexbin(x, y, C = None, gridsize = 100, bins = None, xscale = 'linear', yscale = 'linear', cmap=None, norm=None, vmin=None, vmax=None, alpha=None, 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 between 0 and 1, or None 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=iRfgs8x contains non-positive values, so can not be log-scaleds8y contains non-positive values, so can not be log-scaledg& .>iig@g?iRggg?giNR,i RtfaceRRRRc s{|j|jdt|d}tjt|}x:tt|D]&}|||k}|||td}nj|tj|||| | d| d| d||}|j||j|j ||j dkr|j j n|dk s|dk r|j ||n |j|j||j|jjj|fd|_|S(s call signature:: imshow(X, cmap=None, norm=None, aspect=None, interpolation=None, alpha=None, vmin=None, vmax=None, origin=None, extent=None, **kwargs) Display the image in *X* to current axes. *X* may be a float array, a uint8 array or a PIL image. If *X* is an array, *X* can have the following shapes: * MxN -- luminance (grayscale, float array only) * MxNx3 -- RGB (float or uint8 array) * MxNx4 -- RGBA (float or uint8 array) The value for each component of MxNx3 and MxNx4 float arrays should be in the range 0.0 to 1.0; MxN float arrays may be normalised. An :class:`matplotlib.image.AxesImage` instance is returned. Keyword arguments: *cmap*: [ None | Colormap ] A :class:`matplotlib.cm.Colormap` instance, eg. cm.jet. If *None*, default to rc ``image.cmap`` value. *cmap* is ignored when *X* has RGB(A) information *aspect*: [ None | 'auto' | 'equal' | scalar ] If 'auto', changes the image aspect ratio to match that of the axes If 'equal', and *extent* is *None*, changes the axes aspect ratio to match that of the image. If *extent* is not *None*, the axes aspect ratio is changed to match that of the extent. If *None*, default to rc ``image.aspect`` value. *interpolation*: Acceptable values are *None*, 'nearest', 'bilinear', 'bicubic', 'spline16', 'spline36', 'hanning', 'hamming', 'hermite', 'kaiser', 'quadric', 'catrom', 'gaussian', 'bessel', 'mitchell', 'sinc', 'lanczos' If *interpolation* is *None*, default to rc ``image.interpolation``. See also the *filternorm* and *filterrad* parameters *norm*: [ None | Normalize ] An :class:`matplotlib.colors.Normalize` instance; if *None*, default is ``normalization()``. This scales luminance -> 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) or *None* *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 filterradtresamplec sjj|S(N(R+R(R}(R/(sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyRtsN(RRRRRRRtset_dataRRRR<R6RRtset_urlt set_extentt get_extentR+RoR(R/RyRRROt interpolationRRRtoriginR-RQRRtimlimRturlR=R((R/sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytimshows.i         c G st|dkr`|d}|j\}}tjtj|dtj|d\}}n:t|dkr|\}}}ntd||f|jd}|jd} t|jdks|jddkr|jd|} | j| dd}nt|jdks.|jddkrX|j| d} | j|dd}n|j|jkrtd||fn|||fS( Niiis%Illegal arguments to %s; see help(%s)iiRs,Incompatible X, Y inputs to %s; see help(%s)(RhRQROtmeshgridRjRBtreshapeR$( R/tfuncnameR<RtnumRowstnumColsRyRRtNyRTRU((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt _pcolorargsys* 5  ((c( O sY|js|jn|jdd }|jdd }|jdd }|jdd }|jdd }|jdd}|jd|\} } } | j\} } tj| } tj| } tj| } tj| tj| }|d d d d f|d d d d f|d d d d f|d d d d f}tj| d | d d | d f|}t j }t j }|d kj }||tj | d d d d fj }||tj | d d d d fj }||tj | d d d d fj }||tj | d d d d fj }||tj | d d d d fj }||tj | d d d d fj }||tj | d d d d fj }||tj | d d d d fj }t|}t j|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 d d }|j|ddf}||tj | d | d d | d fj } |dkrd}nd}d}d|kr|jd|d` 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. 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 or *None* the alpha blending value Return value is a :class:`matplotlib.collection.Collection` instance. .. _axes-pcolor-grid-orientation: The grid orientation follows the MATLAB 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 Note: the default *antialiaseds* is taken from rcParams['patch.antialiased'], which defaults to *True*. In some cases, particularly if *alpha* is 1, you may be able to reduce rendering artifacts (light or dark patch boundaries) by setting it to *False*. An alternative it to set *edgecolors* to 'face'. Unfortunately, there seems to be no single combination of parameters that eliminates artifacts under all conditions. RRRRRtshadingtflattpcoloriiiNRiiRRqRg?R,RR-Rt antialiasedt antialiaseds(Rq(g?("RRR8RRRQRRt getmaskarrayRORSRRtfilledRht concatenateRRRRRRRRRRRR t compressedR?R@RRR((R/R<R=RRRRRRRyRRRRRtxymaskRSRt ravelmasktX1tY1tX2tY2tX3tY3tX4tY4tnpolyR9RRRRRTRURRRRR((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyRs j1  44444444 ,&&&, <                 c O s|js|jn|jdd}|jdd}|jdd}|jdd}|jdd}|jddj}|jdd } |jd t} |jd |\} } } | j\}}|d krtj | d |dd |df} n | j } | j } | j } t j ||dfdt }| |ddd f<| |dddf<|dks| d krd}nd }t j|d|d||d | d||}|j||j| |dk rn|j||j||dk s2|dk rE|j||n |j|jtt j| }t j| }t j| }t j| }||f||ff}|j||j|j||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' | 'gouraud' ] If 'faceted', a black grid is drawn around each rectangle; if 'flat', edges are not drawn. Default is 'flat', contrary to MATLAB. 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 or *None* 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. RRRRRRRRRRt pcolormeshtgouraudiiiRgNR(RRR8RRR RRQRRRORRkRtQuadMeshRRRRRRRR?R@RRR(R/R<R=RRRRRRRRRyRRRRtcoordst showedgesRRRRRR((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyRpsZA  0              cO s|js|jn|jdd}|jdd}|jdd}|jdd}|jdd}|dk rn|d}|j\} } t|dkrd} d | g} d | g} nGt|d kr|d \} } tj| } tj| } | jdkr| jdkr| j d krP| j d krPd} qtj | }tj | }tj |d tj |j krtj |d tj |j krd} qd } q| jd kr| jd krd} qtdn td| dkr<tj|}| j}| j}| d}| d}tj||d ftj}||ddd f<||dddfR((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt pcolorfastsN     ((              6 .          (cO s3|js|jnt|d|r |g}1n't?|r t@|}1n td/t|1|kr |1d.g|t|17}1nxNt6| |1D]=\})}2x.|)D]&}3|3jA||3jB|2d.}2q( Wq W|r | d kr |jC|ddf|ddfgd0tq |jCd|dfd|dfgd1tn|j||j||jD|dkr |d|t!jEd2| dfS||t!jEd3| fSdS(8sb 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. Multiple data can be provided via *x* as a list of datasets of potentially different length ([*x0*, *x1*, ...]), or as a 2-D ndarray in which each column is a dataset. Note that the ndarray form is transposed relative to the list form. Masked arrays are not supported at present. Keyword arguments: *bins*: Either an integer number of bins or a sequence giving the bins. If *bins* is an integer, *bins* + 1 bin edges will be returned, consistent with :func:`numpy.histogram` for numpy version >= 1.3, and with the *new* = True argument in earlier versions. 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 based on the specified bin range instead of the range of x. *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)) .. Note:: Until numpy release 1.5, the underlying numpy histogram function was incorrect with *normed*=*True* if bin sizes were unequal. MPL inherited that error. It is now corrected within MPL when using earlier numpy versions *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. *color*: Color spec or sequence of color specs, one per dataset. Default (*None*) uses the standard line color sequence. *label*: String, or sequence of strings to match multiple datasets. Bar charts yield multiple patches per dataset, but only the first gets the label, so that the legend command will work as expected:: 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() kwargs are used to update the properties of the :class:`~matplotlib.patches.Patch` instances returned by *hist*: %(Patch)s **Example:** .. plot:: mpl_examples/pylab_examples/histogram_demo.py RIt barstackedR+t stepfilledshisttype %s is not recognizedRR*Rs align kwarg %s is not recognizedR8R6s&orientation kwarg %s is not recognizedRnsFhist now uses the rwidth to give relative width and not absolute widthiiisx must be 1D or 2DsX2D hist input should be nsamples x nvariables; this looks transposed (shape is %d x %d)Nis+color kwarg must have one color per datasetsweights must be 1D or 2Ds'weights should have the same shape as xRs1.3tnewtweightsg{Gz?sQ This release fixes a normalization bug in the NumPy histogram function prior to version 1.5, occuring with non-uniform bin widths. The returned and plotted value is now a density: n / (N * bin width), where n is the bin count and N the total number of points. g?gg?gR4g?R3RRfR RaR_R,R`g?R:s4invalid label: must be string or sequence of stringsRRRsLists of Patches(sbarRsstepR(sleftsmidsright(s horizontalsvertical(gg(FRRR RlRR'RROtndarrayRRRRRRRQR%R&RRhRmR$R3RZRRR<RRRR RRRRtinfRRnRPt __version__R t histogramR)RXRkRZRotstdRtsliceRtcumsumRRJRIRiRRRR`RR?RRRR;RRRRR(4R/RTR,RRRt cumulativeRthisttypeR3R5trwidthRfR RR=RR0RFR|twit_saved_autoscalext_saved_autoscaleyt _saved_boundst binsgivenR\R]t hist_kwargsRDRtdbtslcR'ttotwidthtdrRntdwtboffsettstackedt_barfuncR"R6RURIR`txmin0tymin0R_R^RptlblR((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pythistsl     #   "  + # "           ) "  7*                    '    '               00    !iiRc  K s]|js|jntj|||||||| | \} } t| f| _| |7} | d tfkrzd}nd}|j| dt j | | |j d|j d||j t|jj\}}||}tt j |}|dkrd}nd|}t jtj|tj|d|}|j|| | 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(RRRtpsdRhRQRR R+RORcRRRRRRRjRZRtceilRx(R/RTtNFFTtFstFcRtwindowtnoverlaptpad_totsidest scale_by_freqR=tpxxtfreqst psd_unitsRRtintvtlogiR+Rg((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyRs,.         + c  K s)|js|jntj|||||||| | | \} }t|f| _||7}|j|dtjtj | | |j d|j d|j t |jj\}}||}dttj|}tjtj|tj|d|}|j|| |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(RRRtcsdRhRQR+RORctabsoluteRRRR RRRRjRZRRRx(R/RTRURRRRRRRRRR=tpxyRRRRR+Rg((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyRs 0  )    + c  K s|js|jntj|||||||| \} }||7}|j|| | |jd|jd|jt| |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+RRRR (R/RTRURRRRRRRRRR=tcxyR((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyR#s-     ic  K s|js|jntj||||||| | | \}}}dtj|}tj|}| dkrdtj|f} n| \}}||7}|||d|df}|j ||d|| }|j 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$@iiR-RN( RRRtspecgramRORctflipudRR@RR(R/RTRRRRRRRtxextentRRRR=tPxxRR,tZR\R]R-R((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyR\s9     RMcK s |d%kr"d}tjdn|d%krR|d%krRt|drRd}n|d%kr|d%krtj|}tj||k}d|krtjddgdd |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 NonettocooR RR|RqR>tbinarygg?RRROR-RRYtpresenti RRRt markersizeR\R]R^R_g?Rtnbinsi tstepsiiitintegerN( RR%R'RARORRRtListedColormapRQRR RRNRtnonzeroRR[RRRRR4tset_yR6Rtset_ticks_positiontset_major_locatortmtickert MaxNLocatorR R7(R/R t precisionRR ROR=RRRR-R>R"RURTRtmarks((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytspys`H '              c K stj|}|j\}}d|d|ddg}i|d6dd6dd6dd 6}|j||j||}|jjd |jj|jj d |jj t j d d dddddgdt |jj t j 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?R-RYRRRRMROg?RRi Riiii R(RORRQRRR4RR6RRRRRR R7(R/R R=RRR-R\R((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytmatshow" s&      c C sWg}g}|j||jjr;|j|jn|jjr|j|jj|jj|\}}|j||gn|jjr|j|jj|jj|\}}|j||gn|jg|D]!}|jr|j|^qt j j g|D]*} | j dksD| j dkr | ^q } | S(st return the tight bounding box of the axes. The dimension of the Bbox in canvas coordinate. i(RoR4RR6Rtget_ticklabel_extentsR R7RRRRRnRo( R/R!R*Rtbbx1tbbx2tbby1tbby2R"RHt_bbox((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt get_tightbboxK s  5CcC sqxj|j|jfD]V}|jdkrV|j}|jtj|j|jq|jtj qWdS(s(Add autoscaling minor ticks to the axes.RfN( R6R7Rt_scaletset_minor_locatorRt LogLocatortbasetsubstAutoMinorLocator(R/RR ((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt minorticks_oni s  "cC s0|jjtj|jjtjdS(s!Remove minor ticks from the axes.N(R6R$Rt NullLocatorR7(R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytminorticks_offr scO stj|||S(N(tmtrit tricontour(R/R<R=((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyR-w scO stj|||S(N(R,t tricontourf(R/R<R=((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyR.{ scO stj|||S(N(R,t tripcolor(R/R<R=((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyR/ scO stj|||dS(N(R,ttriplot(R/R<R=((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyR0 s(RyRzR{R>RtGrouperRRRRR R0RRRRRRRRRRRR RRRRRRRRRREtpropertytframeRFR.RGRIRKRRRRNRTRRbRdRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR-R.R/t_Axes__draw_animateR5R6R7R8Rtdedent_interpdRRGRKRTRRRURVRWRXRXRqRRRgRReRhRjRlRnRrRsRtRYRpRRRhRRwRxRyRzR{R|RRRRRRRRRRRRRRRRRRRRRt _Axes__pickRRRRRRRRRRRRtdedentRRR+RR R R RRt detrend_noneR RR!R&R+RIRJRORVRsR>RRRORRQRSRWRTRUt quiverkey_docR[RXt quiver_docR^R`R}RRRRRRRRRt contour_docRRRRRRRRRtwindow_hanningRRRRRRR"R)R+R-R,t TriContourSetttricontour_docR.R/R0(((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyR|LsV        &        !     Y      6      ;                    &        :  (?y      K' P       U          V             E      E   O@@89TOG<44? W  F++         :      0l    {           E B 6  F  { )      (tGridSpect SubplotSpect SubplotBasecB sqeZdZdZdZdZdZdZdZdZ dZ d Z d Z 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|dkrt|dtr>|d|_qy2tt|d}tt|\}}}Wntk rtdnXt |||d|_nt|dkrq|\}}}t|}t|}t|t rNt|dkrNg|D]}t|^q}t |||dd|d!|_qt ||t|d|_ntd|f|j |j j |||j|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*. iis4Single argument to subplot must be a 3-digit integeriis"Illegal argument(s) to subplot: %sN(RRhRR@t _subplotspecRRtmapR R?R~t update_paramst _axes_classR0tfigbox( R/RR<R=R trowstcolstnumRD((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyR0 s,     !(# cC s/|jj\}}}}|||dfS(s"get the subplot geometry, eg 2,2,3i(tget_subplotspect get_geometry(R/RGRHtnum1tnum2((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyRK scC s8t|||d|_|j|j|jdS(s0change subplot geometry, eg. from 1,1,1 to 2,2,3iN(R?RBRDRRF(R/tnumrowstnumcolsRI((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytchange_geometry s cC s|jS(s8get the SubplotSpec instance associated with the subplot(RB(R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyRJ scC s ||_dS(s8set the SubplotSpec instance associated with the subplotN(RB(R/t subplotspec((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pytset_subplotspec scC s@|jj|jdt\|_|_|_|_|_dS(s0update the subplot position from fig.subplotparst return_allN( RJRRR RFtrowNumtcolNumRR(R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyRD scC s |jdkS(Ni(RU(R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt is_first_col scC s |jdkS(Ni(RT(R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt is_first_row scC s|j|jdkS(Ni(RTR(R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt is_last_row scC s|j|jdkS(Ni(RUR(R/((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt is_last_col scC sd|j}|j}x!|jD]}|j|q%Wx!|jD]}|j|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(RXRVRnRR{(R/tlastrowtfirstcolR((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyt label_outer s   (RyRzR{R0RKRPRJRRRDRVRWRXRYR\(((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axes.pyRA s 1         cC sj|dkrt}ntj|}|dkrftjd|jt|fi|d6}|t|s<        S [r