Ñò D¨£Jc @ s¸ddklZddkZeiZddkiZddklZddki Z ddk i Z ddkiZddkiZddkiZddkZdeifd„ƒYZdS(iÿÿÿÿ(tdivisionN(tallow_rasterizationtSpinecB sÏeZdZd„Zd„Zeieiƒeie_d„Z d„Z d„Z d„Z d„Z d„Zd „Zd „Zd „Zd „Zd „Zd„Zed„ƒZed„ƒZd„ZRS(s“an axis spine -- the line noting the data area boundaries Spines are the lines connecting the axis tick marks and noting the boundaries of the data area. They can be placed at arbitrary positions. See function:`~matplotlib.spines.Spine.set_position` for more information. The default position is ``('outward',0)``. Spines are subclasses of class:`~matplotlib.patches.Patch`, and inherit much of their behavior. Spines draw a line or a circle, depending if function:`~matplotlib.spines.Spine.set_patch_line` or function:`~matplotlib.spines.Spine.set_patch_circle` has been called. Line-like is the default. cC sdS(NR((tself((s7/usr/lib64/python2.6/site-packages/matplotlib/spines.pyt__str__"scK sÁtt|ƒi|||_|i|iiƒ||_|idƒ|it dƒ|i t dƒd|_ |i dƒ|i|iiƒd|_||_d|_tiƒ|_dS(sè - *axes* : the Axes instance containing the spine - *spine_type* : a string specifying the spine type - *path* : the path instance used to draw the spine Valid kwargs are: %(Patch)s tnonesaxes.edgecolorsaxes.linewidthg@tlineN(tsuperRt__init__taxest set_figuretfiguret spine_typet set_facecolort set_edgecolortrcParamst set_linewidthtNonetaxist set_zordert set_transformt transAxest _positiont_patht _patch_typet mtransformstIdentityTransformt_patch_transform(RR R tpathtkwargs((s7/usr/lib64/python2.6/site-packages/matplotlib/spines.pyR%s         cC s9d|_||_|d|_|d|_d|_dS(sset the spine to be circulartcircleiiN(Rt_centert_widtht_heightt_angle(Rtcentertradius((s7/usr/lib64/python2.6/site-packages/matplotlib/spines.pytset_patch_circleMs     cC s d|_dS(sset the spine to be linearRN(R(R((s7/usr/lib64/python2.6/site-packages/matplotlib/spines.pytset_patch_lineUscC sŒ|i|idƒ|i|idƒf}|i|iƒ}|i|iƒ}tiƒi|d|dƒi|i ƒi |Œ|_ dS(sNOTE: This cannot be called until after this has been added to an Axes, otherwise unit conversion will fail. This maxes it very important to call the accessor method and not directly access the transformation member variable. iigà?N( tconvert_xunitsRtconvert_yunitsR R!RtAffine2Dtscalet rotate_degR"t translateR(RR#twidththeight((s7/usr/lib64/python2.6/site-packages/matplotlib/spines.pyt_recompute_transformZs  cC s9|idjo|iƒ|iStt|ƒiƒSdS(NR(RR/RRRtget_patch_transform(R((s7/usr/lib64/python2.6/site-packages/matplotlib/spines.pyR0js cC s|iS(N(R(R((s7/usr/lib64/python2.6/site-packages/matplotlib/spines.pytget_pathqscC s1|idjod|_|i|iƒndS(Ntoutwardg(R2g(RRt set_position(R((s7/usr/lib64/python2.6/site-packages/matplotlib/spines.pyt_ensure_position_is_setts cC s.||_|idj o|iiƒndS(sÄregister an axis An axis should be registered with its corresponding spine from the Axes instance. This allows the spine to clear any axis properties when needed. N(RRtcla(RR((s7/usr/lib64/python2.6/site-packages/matplotlib/spines.pyt register_axiszs cC s.d|_|idj o|iiƒndS(sClear the current spineN(RRRR5(R((s7/usr/lib64/python2.6/site-packages/matplotlib/spines.pyR5…s cC s¤|iƒ|i}ti|ƒo2|djo d}qU|djo d}qUn|\}}|djoØ|djodtiƒf|_q |idjouhdd 6dd 6dd 6dd 6|i}||dd}||dd}dti|||i i ƒf|_q t i d|iƒdtiƒf|_n[|djo©|idjo.dti idddd|dƒf|_q |idjo.dti iddddd|ƒf|_q t i d|iƒdtiƒf|_n¥|djo—|idjo%dti ƒi|dƒf|_q |idjo%dti ƒid|ƒf|_q t i d|iƒdtiƒf|_ndS(s5calculate the offset transform performed by the spineR#R gà?tzerotdataiR2tidentitytlefttrightttoptbottomiÿÿÿÿigR@tposts2unknown spine type "%s": no spine offset performedtpreN(saxesgà?(sdatai(R:R;stopR=(iÿÿÿÿi(ii(iiÿÿÿÿ(ii(R:R;(R=stop(R:R;(R=stop(R4Rtcbooktis_string_likeRRt_spine_transformR tScaledTranslationR tdpi_scale_transtwarningstwarnR)t from_valuesR,(Rtpositiont position_typetamountt offset_vectoffset_xtoffset_y((s7/usr/lib64/python2.6/site-packages/matplotlib/spines.pyt_calc_offset_transform‹s^               " "   ""  cC sº|djon||_|iƒ|iƒ}|id joti||iiƒ}n-|id joti|ii|ƒ}n|i|ƒ|i dj o|i i ƒndS( spset the position of the spine Spine position is specified by a 2 tuple of (position type, amount). The position types are: * 'outward' : place the spine out from the data area by the specified number of points. (Negative values specify placing the spine inward.) * 'axes' : place the spine at the specified Axes coordinate (from 0.0-1.0). * 'data' : place the spine at the specified data coordinate. Additionally, shorthand notations define a special positions: * 'center' -> ('axes',0.5) * 'zero' -> ('data', 0.0) R#R7R:R;R=R<N(scenterszero(sleftsright(sbottomstop( RRNtget_spine_transformR Rtblended_transform_factoryR RRRRR5(RRHtttt2((s7/usr/lib64/python2.6/site-packages/matplotlib/spines.pyR3Æs       cC s|iƒ|iS(sget the spine position(R4R(R((s7/usr/lib64/python2.6/site-packages/matplotlib/spines.pyt get_positionðs cC s•|iƒ|i\}}|djo¸|idjo@|ii||ii|ii}ti||ii ƒ}nd|idjo@|ii||ii|ii}ti|ii |ƒ}nt d|iƒ‚|S|idjo|ii ddƒ}n=|idjo|ii ddƒ}nt d|iƒ‚|d jo|S|d jo ||S|d jo ||St d |ƒ‚d S(sget the spine transformR8R:R;R<R=sunknown spine spine_type: %stwhichtgridR9R>R?s unknown spine_transform type: %sN(sleftsright(stopsbottom(sleftsright(stopsbottom( R4RBR R t transScalet transLimitsRRRPt transDatat ValueErrortget_yaxis_transformtget_xaxis_transform(Rtwhatthowt data_xformtresulttbase_transform((s7/usr/lib64/python2.6/site-packages/matplotlib/spines.pyROõs6         cK sÁ|djotidd gƒ}nƒ|djotid d gƒ}n]|djotid d gƒ}n7|djotiddgƒ}ntd|ƒ‚|||||}|S(sA (staticmethod) Returns a linear :class:`Spine`. R:ggð?R;R=R<s"unable to make path for spine "%s"(gg(ggð?(gð?g(gð?gð?(gg(gð?g(ggð?(gð?gð?(tmpathtPathRY(tclsR R RRR_((s7/usr/lib64/python2.6/site-packages/matplotlib/spines.pyt linear_spines    cK s>tiiƒ}d}|||||}|i||ƒ|S(sC (staticmethod) Returns a circular :class:`Spine`. R(RaRbt unit_circleR%(RcR R#R$RRR R_((s7/usr/lib64/python2.6/site-packages/matplotlib/spines.pytcircular_spine,s cC s|i|ƒdS(sö Set the edgecolor. ACCEPTS: matplotlib color arg or sequence of rgba tuples .. seealso:: :meth:`set_facecolor`, :meth:`set_edgecolor` For setting the edge or face color individually. N(R(Rtc((s7/usr/lib64/python2.6/site-packages/matplotlib/spines.pyt set_color7s (t__name__t __module__t__doc__RRR@tdedenttmartisttkwdocdR%R&R/R0R1R4R6R5RNR3RSROt classmethodRdRfRh(((s7/usr/lib64/python2.6/site-packages/matplotlib/spines.pyRs&  &        ; *  % (t __future__Rt matplotlibRtmatplotlib.artisttartistRmRtmatplotlib.transformst transformsRtmatplotlib.linestlinestmlinestmatplotlib.patchestpatchestmpatchestmatplotlib.pathRRatmatplotlib.cbookR@REtPatchR(((s7/usr/lib64/python2.6/site-packages/matplotlib/spines.pyts