)Uc@ sdZddlmZddlmZddljZddlmZddlj Z ddl j Z ddl j ZddljZddljZddljZddljZddljZddljZ ddl!Z"dZ#dej$fdYZ%d e%fd YZ&d e%fd YZ'd fdYZ(dej$fdYZ)de)fdYZ*de)fdYZ+dS(s( Classes for the ticks and x and y axis i(tdivision(trcParamsN(tallow_rasterizationitTickcB seZdZdddddddddeeeeedZdZdZddZ e j j je _dZ dZ dZdZd Zd Zd Zd Zd ZdZedZdZeZdZdZdZedZdZRS(s Abstract base class for the axis ticks, grid lines and labels 1 refers to the bottom of the plot for xticks and the left for yticks 2 refers to the top of the plot for xticks and the right for yticks Publicly accessible attributes: :attr:`tick1line` a Line2D instance :attr:`tick2line` a Line2D instance :attr:`gridline` a Line2D instance :attr:`label1` a Text instance :attr:`label2` a Text instance :attr:`gridOn` a boolean which determines whether to draw the tickline :attr:`tick1On` a boolean which determines whether to draw the 1st tickline :attr:`tick2On` a boolean which determines whether to draw the 2nd tickline :attr:`label1On` a boolean which determines whether to draw tick label :attr:`label2On` a boolean which determines whether to draw tick label cC s7tjj|| d kr)td} n|j|j||_|jj }||_ ||_ |d kr|rtd|}qtd|}n||_ ||_ |d krtd|}n||_|d kr|rtd|}qtd|}n||_| d kr)td|} n| |_| d krOtd|} n| |_| d kr|r}tjjd} qtjj} n| |_|j||j|_|j|_|j|_|j|_|j|_|j |_!| |_"| |_#||_$||_%||_&|j'|d S( s bbox is the Bound2D bounding box in display coords of the Axes loc is the tick location in data coords size is the tick size in points s axes.grids %s.major.sizes %s.minor.sizes%s.colors %s.major.pads %s.minor.pads %s.labelsizeg{Gz?N((tartisttArtistt__init__tNoneRt set_figuretfiguretaxest__name__tlowert_namet_loct_sizet_widtht_colort _base_padt _labelcolort _labelsizetmlinestLine2Dtzordert_zordert apply_tickdirt_get_tick1linet tick1linet_get_tick2linet tick2linet _get_gridlinetgridlinet _get_text1tlabel1tlabelt _get_text2tlabel2tgridOnttick1Onttick2Ontlabel1Ontlabel2Ontupdate_position(tselfR tlocR"tsizetwidthtcolorttickdirtpadt labelsizet labelcolorRR%R&R'R(R)tmajortname((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyR>s\                         cC sdS(s; Calculate self._pad and self._tickmarkers N((R+R0((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRscC s(|j|j|j|j|jg}|S(N(RRRR!R$(R+tchildren((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyt get_childrens$cC s-tjj||||jj||dS(N(RRt set_clip_pathR(R+tclippatht transform((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyR8scC s|jj|jdS(NgR@(R tdpit_pad(R+((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pytget_pad_pixelsscC s)t|jr|j||StifS(s Test whether the mouse event occured in the Tick marks. This function always returns false. It is more useful to test if the axis as a whole contains the mouse rather than the set of tick marks. (tcallablet _containstFalse(R+t mouseevent((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pytcontainsscC s ||_dS(sJ Set the tick label pad in points ACCEPTS: float N(R<(R+tval((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pytset_padscC s|jS(s-Get the value of the tick label pad in points(R<(R+((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pytget_padscC sdS(sGet the default Text 1 instanceN((R+((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyR scC sdS(sGet the default Text 2 instanceN((R+((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyR#scC sdS(s)Get the default line2D instance for tick1N((R+((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRscC sdS(s)Get the default line2D instance for tick2N((R+((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRscC sdS(s2Get the default grid Line2d instance for this tickN((R+((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRscC s|jS(s2Return the tick location (data coords) as a scalar(R(R+((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pytget_locscC s|jsdS|j|jtj|j|j}|r|jr`|jj |n|j r||j j |n|j r|j j |qn|jr|jj |n|jr|jj |n|j|jdS(N(t get_visiblet open_groupR t mtransformstinterval_containstget_view_intervalRFR%RtdrawR&RR'RR(R!R)R$t close_group(R+trenderertmidPoint((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRLs       cC s|jj|dS(sA Set the text of ticklabel ACCEPTS: str N(R!tset_text(R+ts((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyt set_label1scC s|jj|dS(sB Set the text of ticklabel2 ACCEPTS: str N(R$RP(R+RQ((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyt set_label2scC s|j|jdS(N(RR (R+ta((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyt_set_artist_propsscC stddS(sCreturn the view Interval instance for the axis this tick is tickingsDerived must overrideN(tNotImplementedError(R+((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRKscC stddS(NsDerived must override(RV(R+tvmintvmaxtignore((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pytset_view_interval sc K s(dddddg}g|D]}||kr|^q}x'|D]}t|||j|qAWg|D]}|dkrk|^qk}|r4|jd|j|_|j|jd|j|jd}|jj||jd}|j j||j j |j d|j j |j d ntg|jD]}|ddkrD|^qD}|r|j j||j j|x1|jD] \}} t|d || qWng|jD]}|ddkr|^q} xw| D]o\}} t|d || |d krH|j j| |j j| q|j j| |j j| qWg|jD]}|ddkry|^qy} | r$tg| D]\}} |d| f^q} |jj| |j j| x1| jD] \}} t|d || qWndS(NR%R&R'R(R)R1R0iiR/Rt_R-R.R2R3i(spadstickdir(scolorszorder(ssizeswidth(s labelsizes labelcolor(tsetattrtpopRRt_tickdirt_get_text1_transformR!t set_transformt_get_text2_transformR$Rt set_markert _tickmarkersRtdicttitemstsettset_markersizetset_markeredgewidth( R+tkwtswitchkwtktswitchestdirpadttranstkvttick_kwtvt tick_listt label_listtlabel_kw((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyt _apply_params sJ% %/ /N(R t __module__t__doc__RtTrueR@RRR7R8RRR=RBRDRER R#RRRRFRRLRRt set_labelRSRURKRZRu(((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRsJ' I                 tXTickcB seZdZdZdZdZdZdZdZdZdZ d Z d Z d Z e d Zd ZdZRS(sq Contains all the Artists needed to make an x tick - the tick line, the label text and the grid line txtickcC s|jj|jS(N(R tget_xaxis_text1_transformR<(R+((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyR_=scC s|jj|jS(N(R tget_xaxis_text2_transformR<(R+((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRa@scC s|dkr td|j}n||_|jdkr\tjtjf|_|j|_ n(tjtjf|_|j|j |_ dS(Ns %s.directiontin( RRR R^RtTICKUPtTICKDOWNRcRR<R(R+R0((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRCs  c C su|j\}}}tjdddddtjd|jd|jd|d|}|j||j||S( sGet the default Text instancetxitytfontpropertiesR-R/tverticalalignmentthorizontalalignment( R_tmtexttTextt font_managertFontPropertiesRRR`RU(R+Rntvertthoriztt((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyR Ps      c C su|j\}}}tjdddddtjd|jd|jd|d |}|j||j||S( sGet the default Text 2 instanceRiRiRR-R/RR( RaRRRRRRR`RU(R+RnRRR((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyR#cs      cC s|tjdd ddd|jddd|jdd|jd |jd |j}|j|jj d d |j ||S(sGet the default line2D instancetxdataitydataR/t linestyleRtmarkert markersizetmarkeredgewidthRtwhichttick1(i(i( RRRRcRRRR`R tget_xaxis_transformRU(R+tl((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRts      cC s|tjddddd|jddd|jdd |jd |jd |j}|j|jj d d |j ||S(sGet the default line2D instanceRiRiR/RRRRRRRttick2(i(i( RRRRcRRRR`R RRU(R+R((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRs      c C srtjdddddtddtd d td }|j|jjd d t|j_|j ||S(sGet the default line2D instanceRgRig?R/s grid.colorRsgrid.linestylet linewidthsgrid.linewidthRtgrid(gg(ig?( RRRR`R RtGRIDLINE_INTERPOLATION_STEPStget_patht_interpolation_stepsRU(R+R((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRs    cC s)|}t|jdr0|jjjdkpWt|jdoW|jjjdk}|jry|jj|fn|jr|j j|fn|j r|j j|fn|j r|j j|n|jr|jj|n|rt|j_t|j _t|j _n||_dS(s9Set the location of tick in data coords with scalar *loc*tyaxistlineartxaxisN(thasattrR Rt get_scaleRR&Rt set_xdataR'RR%RR(R!tset_xR)R$Rxt_invalidR(R+R,Rt nonlinear((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyR*s(       cC s |jjjS(s6return the Interval instance for this axis view limits(R tviewLimt intervalx(R+((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRKscC s[|r||f|jj_n9|j\}}t||t||f|jj_dS(N(R RRRKtmintmax(R+RWRXRYtVmintVmax((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRZscC s |jjjS(N(R tdataLimtminposx(R+((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyt get_minposscC s |jjjS(s6return the Interval instance for this axis data limits(R RR(R+((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pytget_data_intervals(R RvRwR_RaRR R#RRRR*RKR@RZRR(((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRz6s           tYTickcB seZdZdZdZdZdZdZdZdZdZ d Z d Z d Z e d Zd ZdZRS(sp Contains all the Artists needed to make a Y tick - the tick line, the label text and the grid line tytickcC s|jj|jS(N(R tget_yaxis_text1_transformR<(R+((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyR_scC s|jj|jS(N(R tget_yaxis_text2_transformR<(R+((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRascC s|dkr td|j}n||_|jdkr\tjtjf|_|j|_ n(tjtjf|_|j|j |_ dS(Ns %s.directionR~( RRR R^Rt TICKRIGHTtTICKLEFTRcRR<R(R+R0((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRs  c C su|j\}}}tjdddddtjd|jd|jd|d|}|j||j||S( sGet the default Text instanceRiRRR-R/RR( R_RRRRRRR`RU(R+RnRRR((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyR s      c C su|j\}}}tjdddddtjd|jd|jd|d |}|j||j||S( sGet the default Text instanceRiRiRR-R/RR( RaRRRRRRR`RU(R+RnRRR((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyR#s      cC svtjd d d|jd|jdddd|jd|jd|j}|j|jj d d |j ||S( sGet the default line2D instanceiR/RRRRRRRR(i(i( RRRRcRRRR`R tget_yaxis_transformRU(R+R((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyR s      cC svtjd d d|jd|jdddd|jd|jd |j}|j|jj d d |j ||S(sGet the default line2D instanceiiR/RRRRRRRR(i(i( RRRRcRRRR`R RRU(R+R((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRs      c C srtjdd dddtddtdd td }|j|jjd d t|j_|j ||S(sGet the default line2D instanceRiiRR/s grid.colorRsgrid.linestyleRsgrid.linewidthRR(ii(ii( RRRR`R RRRRRU(R+R((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyR(s    cC s)|}t|jdr0|jjjdkpWt|jdoW|jjjdk}|jry|jj|fn|jr|j j|fn|j r|j j|fn|j r|j j|n|jr|jj|n|rt|j_t|j _t|j _n||_dS(s7Set the location of tick in data coords with scalar locRRRN(RR RRRR&Rt set_ydataR'RR%RR(R!tset_yR)R$RxRR(R+R,RR((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyR*7s(       cC s |jjjS(s6return the Interval instance for this axis view limits(R Rt intervaly(R+((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRKRscC s[|r||f|jj_n9|j\}}t||t||f|jj_dS(N(R RRRKRR(R+RWRXRYRR((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRZVscC s |jjjS(N(R Rtminposy(R+((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyR]scC s |jjjS(s6return the Interval instance for this axis data limits(R RR(R+((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyR`s(R RvRwR_RaRR R#RRRR*RKR@RZRR(((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRs            tTickercB seZdZdZRS(N(R RvRtlocatort formatter(((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRestAxiscB seZdZdZdZddZdHdZdZdZ dZ d Z d Z d Z d Zd edZeedZdHdZdZedZdZdZdZdZdZdZdZdZedZ dZ!dZ"dZ#dZ$d Z%d!Z&d"Z'd#Z(ed$Z)d%Z*d&Z+ed'Z,d(Z-d)Z.ed*Z/d+Z0d,Z1d-Z2d.Z3d/Z4d0Z5d1Z6dHd2Z7dHd3Z8dHd d4Z9d5Z:d6Z;d7Z<d8Z=d9Z>d:Z?dHd;Z@d<ZAd=ZBd>ZCd?ZDd@ZEdAZFedBZGdCZHdDZIdEZJdFZKdHdGZLRS(Is Public attributes * :attr:`axes.transData` - transform data coords to display coords * :attr:`axes.transAxes` - transform axis coords to display coords * :attr:`labelpad` - number of points between the axis and its label icC s'|jjdt|jjjdS(Ns(%f,%f)i(ii(t __class__R ttupleR t transAxesttransform_point(R+((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyt__str__vs icC stjj||j|jt|_t|_t|_t|_ t|_ ||_ t |_ t |_tjd|_t|_t|_|j|_d|_|j|_g|_g|_||_t|_t|_|j |j!ddS(s= Init the axis with the parent Axes instance tunitssunits finalizeiRN(sunitssunits finalize("RRRRR RxtisDefault_majloctisDefault_minloctisDefault_majfmttisDefault_minfmttisDefault_labelR RR4tminortcbooktCallbackRegistryt callbackst _autolabelposR@t _smart_boundst _get_labelR"tlabelpadt_get_offset_textt offsetTextt majorTickst minorTickst pickradiusRdt_major_tick_kwt_minor_tick_kwtclat set_scale(R+R R((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRzs.                 cC sNt|_|dkr$|jj}n|jj||jj||fdS(s Set the coordinates of the label. By default, the x coordinate of the y label is determined by the tick label bounding boxes, but this can lead to poor alignment of multiple ylabels if there are multiple axes. Ditto for the y coodinate of the x label. You can also specify the coordinate system of the label with the transform. If None, the default coordinate system will be the axes coordinate system (0,0) is (left,bottom), (0.5, 0.5) is middle, etc N(R@RRR RR"R`t set_position(R+RRR:((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pytset_label_coordss   cC s |jjS(N(t_scalet get_transform(R+((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRscC s |jjS(N(RR5(R+((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRscK sPtj||||_|jj|t|_t|_t|_t|_dS(N( tmscalet scale_factoryRt#set_default_locators_and_formattersRxRRRR(R+tvaluetkwargs((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRs    cC s|jj|||jS(N(Rtlimit_range_for_scaleR(R+RWRX((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRscC sH|j|jg}|j}|j}|j||j||S(N(R"Rtget_major_tickstget_minor_tickstextend(R+R6t majortickst minorticks((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyR7s     cC s |jtj|jtj|jtj|jtj|j d|j |j t |_ t |_t |_t |_t |_tjd|_td|_t|_|j jd|j |j |jd|_d|_|jddS(sclear the current axistRsunits finalizes axes.gridN(sunitssunits finalize(tset_major_locatortmtickert AutoLocatortset_major_formattertScalarFormattertset_minor_locatort NullLocatortset_minor_formattert NullFormattertset_label_textRUR"RxRRRRRRRRRt _gridOnMajorR@t _gridOnMinorRPt reset_ticksRt converterRt set_units(R+((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRs(           cC sttj|jtj|j|jj|jdtg|jj|jdtgd|_d|_ dS(NR4i( RtpopallRRRt _get_tickRxR@t_lastNumMajorTickst_lastNumMinorTicks(R+((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRs  R4cK s7g}|dks|dkr1|j|jn|dksI|dkr\|j|jn|j|dt}x.|D]&}|r|jn|j|qxW|r|jn~|dks|dkrx$|jD]}|j |jqWn|dks |dkr3x$|j D]}|j |jqWndS(s Set appearance parameters for ticks and ticklabels. For documentation of keyword arguments, see :meth:`matplotlib.axes.Axes.tick_params`. R4tbothRt to_init_kwN( tappendRRt_translate_tick_kwRxtcleartupdateRRRuR(R+RtresetRitdictstkwtranstdttick((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pytset_tick_paramss$   c C sd}dddddddd d d d d dg }ddddddddddg }||}t}|rod|kr|jd|d0 zoom in, else zoom outN(R4Rtzoom(R+R((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRsc C snddl}t|ttfr?ddl}|j|}n|j|jddddddd|dS(s Sets up x-axis ticks and labels that treat the x data as dates. *tz* is a :class:`tzinfo` instance or a timezone string. This timezone is used to create date labels. iNiii(tdatetimet isinstancetstrtunicodetpytzttimezoneRx(R+ttzRR((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyt axis_dates  N(MR RvRwt OFFSETTEXTPADRRRRRRRRR7RRR@R t staticmethodRxRR8RKRZRR"R#RUR/R:R;R<RRLRRRQRRRSRTRWRXRYR[R\R]R^R_R`RRdRfRgRhRiRjRRRRxRtRRRRRRRRRRRRR@RRRR(((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRks  -     # :         T                      $      (     tXAxiscB seZdZdZdZdZdZdZdZdZdZ d Z d Z d Z d Z d ZdZdZedZdZdZedZdZRS(RRc C st|jr|j||S|j|j}}y1|jjj}|j||f\}}Wntk r}t ifSX|jjjd\}}|jjjd\} } |dko|dko||kr|||j kp|| ko|| |j k} | ifS(s<Test whether the mouse event occured in the x axis. ii(ii(ii( R>R?RRR RtinvertedRR R@R( R+RARRRntxaxestyaxesRRotrRtinaxis((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRBs  cC s7|r|j}n |j}t|jddd||S(NiRR4(RRRzR (R+R4Rp((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRs  c C stjdddddtjdtddtd d d d d }|jtj|jj tj |j |d|_ |S(NRg?RiRR-saxes.labelsizeR/saxes.labelcolorRRRtcenterR( RRRRRR`RItblended_transform_factoryR RtIdentityTransformRUtlabel_position(R+R"((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRs       c C stjdddddtjdtddtd d d d d }|jtj|jj tj |j |d|_ |S(NRiRiRR-sxtick.labelsizeR/s xtick.colorRRRRR( RRRRRR`RIRR RRRUtoffset_text_position(R+R((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRs       cC s|jS(s; Return the label position (top or bottom) (R(R+((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pytget_label_positionscC s<|dkr|jjdn|jjd||_dS(s_ Set the label position (top or bottom) ACCEPTS: [ 'top' | 'bottom' ] RtbaselineN(R"tset_verticalalignmentR(R+tposition((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pytset_label_position$s cC s|js dS|jj\}}|jdkrt|sO|jjj}ntj j |}|j }|jj |||j |jjdfndt|s|jjj}ntj j |}|j}|jj |||j |jjdfdS(sq Update the label position based on the sequence of bounding boxes of all the ticklabels NRgR@(RR"t get_positionRR$R R8tyminRIR1R2ty0RRR R;tymaxty1(R+RRRRRR8R((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyR@1s   .  cC s}|jj\}}t|s3|jjj}ntjj|}|j }|jj |||j |j j dfdS(sw Update the offset_text position based on the sequence of bounding boxes of all the ticklabels gR@N(RRR$R R8RRIR1R2RRRR R;(R+RRRRRR8((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRAHs   cC s|j|\}}|jdj}d}|jrK||j|7}nd}|jrn||j|7}n|jdkr||jj|j|7}n||jj|j|7}||fS(s Returns the amount of space one should reserve for text above and below the axes. Returns a tuple (above, below) igR(R:RR=theightRR"R0(R+RNR8R9t padPixelstabovetbelow((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pytget_text_heightsUs   c C s|dkr7|jdddtdtdtdtn|dkrn|jdddtdtdtdtn|dkr|jdddtdtnr|dkr|jdddtdtnG|dkr|jdddtdtdtdtntd |d S( s Set the ticks position (top, bottom, both, default or none) both sets the ticks to appear on both positions, but does not change the tick labels. 'default' resets the tick positions to the default: ticks on both positions, labels at bottom. 'none' can be used if you don't want any ticks. 'none' and 'both' affect only the ticks, not the labels. ACCEPTS: [ 'top' | 'bottom' | 'both' | 'default' | 'none' ] RRRRRRtnoneRwsinvalid position: %sN(R RxR@R (R+R((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pytset_ticks_positionks       cC s|jddS(suse ticks only on topRN(R(R+((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyttick_topscC s|jddS(suse ticks only on bottomRN(R(R+((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyt tick_bottomsc C s0|jd}|jd}|j o=|jo=|j o=|j}|j oc|joc|j oc|j}|rv|rvdS|jo|j o|jo|j }|jo|j o|jo|j }|r|rdS|jo|jo|jo|j }|jo|jo|jo|j }|r,|r,dSdS(sM Return the ticks position (top, bottom, default or unknown) iRRRwtunknown(RRR&R'R(R)( R+tmajttmTtmajorToptminorTopt MajorBottomt MinorBottomt majorDefaultt minorDefault((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pytget_ticks_positions  && && %% cC s |jjjS(s6return the Interval instance for this axis view limits(R RR(R+((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRKscC s|r||f|jj_n{|j\}}||krlt|||t|||f|jj_n-t|||t|||f|jj_dS(s If *ignore* is *False*, the order of vmin, vmax does not matter; the original axis orientation will be preserved. N(R RRRKRR(R+RWRXRYRR((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRZs !cC s |jjjS(N(R RR(R+((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRscC s |jjjS(s6return the Interval instance for this axis data limits(R RR(R+((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRscC s[|r||f|jj_n9|j\}}t||t||f|jj_dS(sset the axis data limitsN(R RRRRR(R+RWRXRYRR((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyR"scC sd\}}|jjj}|jjj}| s>| r|jdk r|jj|j|}|jdk r|j\}}|jj ||j|}|jj ||j|}qn|s||f|jj_ n|s||f|jj_ qndS(sDset the default limits for the axis interval if they are not mutatedgg?N(gg?( R RtmutatedxRRRRyRtdefault_limitsRR(R+txmintxmaxt dataMutatedt viewMutatedR~tvalmintvalmax((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyR#s !(R Rvt axis_nameRBRRRRRR@RARRRRRRKR@RZRRR"R#(((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRs*                tYAxiscB seZdZdZdZdZdZdZdZdZdZ d Z d Z d Z d Z d ZdZdZdZedZdZdZedZdZRS(RRc C st|jr|j||S|j|j}}y1|jjj}|j||f\}}Wntk r}t ifSX|jjjd\}}|jjjd\} } |dko|dko||kr|||j kp|| ko|| |j k} | ifS(s_Test whether the mouse event occurred in the y axis. Returns *True* | *False* ii(ii(ii( R>R?RRR RRRR R@R( R+RARRRnRRRRoRRR((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRBs  cC s7|r|j}n |j}t|jddd||S(NiRR4(RRRR (R+R4Rp((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRs  cC stjdddddtjdtddtd d d d d dd}|jtjtj|j j |j |d|_ |S(NRiRg?RR-saxes.labelsizeR/saxes.labelcolorRRRRtrotationtverticalR( RRRRRR`RIRRR RRUR(R+R"((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRs       c C stjdddddtjdtddtd d d d d }|jtj|jj tj |j |d |_ |S(NRiRg?RR-sytick.labelsizeR/s ytick.colorRRRR( RRRRRR`RIRR RRRUR(R+R((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRs       cC s|jS(s; Return the label position (left or right) (R(R+((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRscC s<|dkr|jjdn|jjd||_dS(s_ Set the label position (left or right) ACCEPTS: [ 'left' | 'right' ] RRN(R"tset_horizontalalignmentR(R+R((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyR%s cC s|js dS|jj\}}|jdkrt|sO|jjj}ntj j |}|j }|jj ||j |jjd|fndt|s|jjj}ntj j |}|j}|jj ||j |jjd|fdS(sq Update the label position based on the sequence of bounding boxes of all the ticklabels NRgR@(RR"RRR$R R8RRIR1R2tx0RRR R;Rtx1(R+RRRRRR8R((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyR@2s   .  cC sS|jj\}}|jjj}|jj|||j|jjdfdS(sw Update the offset_text position based on the sequence of bounding boxes of all the ticklabels gR@N( RRR R8RRRR R;(R+RRRRR((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRAKscC sZ|jj\}}|dkr*d}nd}|jj||jj||fdS(NRii(RRtset_haR(R+RRR((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pytset_offset_positionTs  cC s|j|\}}|jdj}d}|jrK||j|7}nd}|jrn||j|7}n|jdkr||jj|j|7}n||jj|j|7}||fS(NigR(R:RR=R.RR"R0(R+RNR8R9RRR((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pytget_text_widths^s   c C s|dkr7|jdddtdtdtdtn|dkrn|jdddtdtdtdtn|dkr|jdddtdtnr|dkr|jdddtdtnG|dkr|jdddtdtdtdtntd |d S( s Set the ticks position (left, right, both, default or none) 'both' sets the ticks to appear on both positions, but does not change the tick labels. 'default' resets the tick positions to the default: ticks on both positions, labels at left. 'none' can be used if you don't want any ticks. 'none' and 'both' affect only the ticks, not the labels. ACCEPTS: [ 'left' | 'right' | 'both' | 'default' | 'none' ] RRRRRRRRwsinvalid position: %sN(R RxR@R (R+R((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRps       cC s|jddS(suse ticks only on rightRN(R(R+((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyt tick_rightscC s|jddS(suse ticks only on leftRN(R(R+((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyt tick_leftsc C s0|jd}|jd}|j o=|jo=|j o=|j}|j oc|joc|j oc|j}|rv|rvdS|jo|j o|jo|j }|jo|j o|jo|j }|r|rdS|jo|jo|jo|j }|jo|jo|jo|j }|r,|r,dSdS(sJ Return the ticks position (left, right, both or unknown) iRRRwR(RRR&R'R(R)( R+RRt majorRightt minorRightt majorLeftt minorLeftRR((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRs  && && %% cC s |jjjS(s6return the Interval instance for this axis view limits(R RR(R+((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRKscC s|r||f|jj_n{|j\}}||krlt|||t|||f|jj_n-t|||t|||f|jj_dS(s If *ignore* is *False*, the order of vmin, vmax does not matter; the original axis orientation will be preserved. N(R RRRKRR(R+RWRXRYRR((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRZs !cC s |jjjS(N(R RR(R+((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRscC s |jjjS(s6return the Interval instance for this axis data limits(R RR(R+((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRscC s[|r||f|jj_n9|j\}}t||t||f|jj_dS(sset the axis data limitsN(R RRRRR(R+RWRXRYRR((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyR"scC sd\}}|jjj}|jjj}| s>| r|jdk r|jj|j|}|jdk r|j\}}|jj ||j|}|jj ||j|}qn|s||f|jj_ n|s||f|jj_ qndS(sDset the default limits for the axis interval if they are not mutatedgg?N(gg?( R RtmutatedyRRRRyRRRR(R+RRRRR~RR((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyR#s !(R RvRRBRRRRRR@RARRRRRRRKR@RZRRR"R#(((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyRs,                (,Rwt __future__Rt matplotlibRtmatplotlib.artistRRtmatplotlib.cbookRtmatplotlib.font_managerRtmatplotlib.linesRZRtmatplotlib.patchestpatchestmpatchestmatplotlib.scaletscaleRtmatplotlib.textttextRtmatplotlib.tickerttickerRtmatplotlib.transformst transformsRItmatplotlib.unitsRRptnumpyR>RRRRzRRRRR(((sB/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/axis.pyts4 !x