HEX
Server: LiteSpeed
System: Linux standart9.isimtescil.net 3.10.0-962.3.2.lve1.5.26.7.el7.x86_64 #1 SMP Wed Oct 2 07:53:12 EDT 2019 x86_64
User: karalev (5310)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: //proc/self/root/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/spines.pyc
�
�)�Uc@ s�ddlmZddlZejZddljZddlmZddlmZddl	j
Zddlj
ZddljZddljZddljZddlZddlZdejfd��YZdS(i����(tdivisionN(tallow_rasterization(t	docstringtSpinecB seZdZd�Zejd��Zd�Zd�Zd�Z	d�Z
d�Zd�Zd	�Z
d
�Zd�Zd�Zd
�Zd�Zed��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((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/spines.pyt__str__$scK s�tt|�j|�||_|j|jj�||_|jd�|jt	d�|j
t	d�d|_|j
d�|j|jj�d|_t|_d|_t|tjj�s�t�||_d|_tj�|_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	transDatat_boundstFalset
_smart_boundst	_positiont
isinstancet
matplotlibtpathtPathtAssertionErrort_patht_patch_typetmtransformstIdentityTransformt_patch_transform(RR
R
Rtkwargs((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/spines.pyR	's"
		
	
					cC sW||_|jdkr.|jjj|�n%|jdkrS|jjj|�ndS(s6set the spine and associated axis to have smart boundstlefttrightttoptbottomN(R&R'(stopR)(RR
R
tyaxistset_smart_boundstxaxis(Rtvalue((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/spines.pyR+Rs
	cC s|jS(s&get whether the spine has smart bounds(R(R((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/spines.pytget_smart_bounds\scC sLd|_||_|d|_|d|_d|_|j|jj�dS(sset the spine to be circulartcircleiiN(R!t_centert_widtht_heightt_angleRR
t	transAxes(Rtcentertradius((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/spines.pytset_patch_circle`s		

	cC s
d|_dS(sset the spine to be linearRN(R!(R((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/spines.pytset_patch_lineiscC s�|jdkst�|j|jd�|j|jd�f}|j|j�}|j|j�}tj�j	|d|d�j
|j�j|�|_
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.
        R/iig�?N(R!Rtconvert_xunitsR0tconvert_yunitsR1R2R"tAffine2Dtscalet
rotate_degR3t	translateR$(RR5twidththeight((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/spines.pyt_recompute_transformnscC s7|jdkr |j�|jStt|�j�SdS(NR/(R!RAR$RRtget_patch_transform(R((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/spines.pyRB~s
cC s|jS(N(R (R((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/spines.pytget_path�scC s/|jdkr+d|_|j|j�ndS(Ntoutwardg(RDg(RRtset_position(R((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/spines.pyt_ensure_position_is_set�s	cC s,||_|jdk	r(|jj�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((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/spines.pyt
register_axis�s	cC s,d|_|jdk	r(|jj�ndS(sClear the current spineN(RRRRG(R((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/spines.pyRG�s	cC s�|j�|j}tj|�rO|dkr7d}qO|dkrOd}qOnt|�dksmtd��|\}}|d	kr�|dkr�tStSd
S(
s�return True if directly on axes frame

        This is useful for determining if a spine is the edge of an
        old style MPL plot. If so, this function will return True.
        R5R
g�?tzerotdataiisposition should be 2-tupleRDN(saxesg�?(sdatai(RFRtcbooktis_string_liketlenRtTrueR(Rtpositiont
position_typetamount((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/spines.pyt
is_frame_like�s
		cC s�|jdkrdS|jdkr3|jdkrI|jjj\}}n:|jdkrp|jjj\}}ntd|j��|jrB||kr�||}}n|}|}~~|jdkr�|jj	j\}}|jj
�}n6|jdkr&|jj	j\}}|jj�}nt|�}|j
�tj|�}||krg||}}n||kr||}nN||k||k@}||}	t|	�r�|	d}n|}t||�}||kr�|}q0||k||k@}||}	t|	�r|	d	}n|}t||�}qBn|j\}}|jj}
|
jdksjtd��|jdkr�||
d<||
d<n6|jdkr�||
d<||
d<ntd
t��|
|j_dS(s3automatically set spine bounds to the view intervalR/NR&R'R(R)sunknown spine spine_type: %si����iisunexpected vertices shapeis#unable to set bounds for spine "%s"(sleftsright(stopsbottom(sleftsright(stopsbottom(ii(sleftsright(ii(ii(sbottomstop(ii(ii(R
RRR
tviewLimt	intervalyt	intervalxt
ValueErrorRtdataLimt
get_ytickst
get_xtickstlisttsorttnptarrayRMtmaxtminR tverticestshapeR(Rtlowthightviewlim_lowtviewlim_hightdatalim_lowtdatalim_highttickstcondttickvalstv1((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/spines.pyt_adjust_location�sh	
	

	






cC s |j�tt|�j|�S(N(RlRRtdraw(Rtrenderer((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/spines.pyRms
cC s�|j�|j}tj|�rO|dkr7d}qO|dkrOd}qOnt|�dksmtd��|\}}|dks�t�|d	krj|dkr�d
tj�f|_q�|j	dkr>idd6dd6dd6dd
6|j	}||dd}||dd}dtj
|||jj�f|_q�t
jd|j	�d
tj�f|_nN|dkr|j	dkr�dtjjdddd|d�f|_q�|j	dkr�dtjjddddd|�f|_q�t
jd|j	�d
tj�f|_n�|dkr�|j	d krYdtj�j|d�f|_q�|j	d!kr�dtj�jd|�f|_q�t
jd|j	�d
tj�f|_ndS("s5calculate the offset transform performed by the spineR5R
g�?RIRJiisposition should be 2-tupleRDtidentityR&R'R(R)i����igR@tposts2unknown spine type "%s": no spine offset performedtpreN(saxesg�?(sdatai(saxessoutwardsdata(sleftsrightstopsbottom(i����i(ii(ii����(ii(sleftsright(sbottomstop(sleftsright(sbottomstop(RFRRKRLRMRR"R#t_spine_transformR
tScaledTranslationRtdpi_scale_transtwarningstwarnR;tfrom_valuesR>(RRORPRQt
offset_vectoffset_xtoffset_y((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/spines.pyt_calc_offset_transformsb
		

		!	!	!!	cC s�|dkrn4t|�dks-td��|ddksCt�||_|j�|j�}|jdkr�tj||jj	�}n*|jdkr�tj|jj	|�}n|j
|�|jd
k	r�|jj
�nd
S(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)

        R5RIis&position should be 'center' or 2-tupleiRDR
RJR&R'R)R(N(scenterszero(soutwardsaxessdata(sleftsright(sbottomstop(RMRRR{tget_spine_transformR
R"tblended_transform_factoryR
RRRRRG(RROtttt2((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/spines.pyREFs 	
	
cC s|j�|jS(sget the spine position(RFR(R((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/spines.pytget_positionps
cC sa|j�|j\}}|dkr�|jj||jj|jj}|jdkrstj||jj	�}n=|jdkr�tj|jj	|�}nt
d|j��|S|jdkr�|jjdd�}n:|jdkr|jjdd�}nt
d|j��|d	kr%|S|d
kr9||S|dkrM||St
d|��d
S(sget the spine transformRJR&R'R(R)sunknown spine spine_type: %stwhichtgridRoRpRqs unknown spine_transform type: %sN(sleftsright(stopsbottom(sleftsright(stopsbottom(
RFRrR
t
transScalettransLimitsR4R
R"R}RRVtget_yaxis_transformtget_xaxis_transform(Rtwhatthowt
data_xformtresulttbase_transform((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/spines.pyR|us2
	cC s1|jdkrtd��n||f|_dS(sSet the bounds of the spine.R/s5set_bounds() method incompatible with circular spinesN(R
RVR(RRbRc((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/spines.pyt
set_bounds�scC s|jS(sGet the bounds of the spine.(R(R((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/spines.pyt
get_bounds�scK s�|dkr$tjd	d
g�}n||dkrHtjddg�}nX|dkrltjd
dg�}n4|dkr�tjddg�}ntd|��|||||�}|S(sA
        (staticmethod) Returns a linear :class:`Spine`.
        R&gi
R'g�?R)R(s"unable to make path for spine "%s"(gi
(gi
(g�?i
(g�?i
(i
g(i
g(i
g�?(i
g�?(tmpathRRV(tclsR
R
R%RR�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/spines.pytlinear_spine�scK s>tjj�}d}|||||�}|j||�|S(sC
        (staticmethod) Returns a circular :class:`Spine`.
        R/(R�Rtunit_circleR7(R�R
R5R6R%RR
R�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/spines.pytcircular_spine�s
cC s|j|�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((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/spines.pyt	set_color�s
(t__name__t
__module__t__doc__RRtdedent_interpdR	R+R.R7R8RARBRCRFRHRGRRRlRRmR{RER�R|R�R�tclassmethodR�R�R�(((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/spines.pyRs2	+	
												S	;	*		#		(t
__future__RRRtmatplotlib.artisttartisttmartistRRtmatplotlib.transformst
transformsR"tmatplotlib.linestlinestmlinestmatplotlib.patchestpatchestmpatchestmatplotlib.pathRR�tmatplotlib.cbookRKtnumpyR\RutPatchR(((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/spines.pyt<module>s