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: //opt/alt/python27/lib64/python2.7/site-packages/matplotlib/spines.pyo
�
�)�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|_||_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_patht_patch_typetmtransformstIdentityTransformt_patch_transform(RR
R
tpathtkwargs((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(Rt_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�|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.
        iig�?N(tconvert_xunitsR,tconvert_yunitsR-R.RtAffine2Dtscalet
rotate_degR/t	translateR(RR1twidththeight((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/spines.pyt_recompute_transformnscC s7|jdkr |j�|jStt|�j�SdS(NR+(RR=RRRtget_patch_transform(R((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/spines.pyR>~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(R@g(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(RRRRC(R((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/spines.pyRC�s	cC s|j�|j}tj|�rO|dkr7d	}qO|dkrOd
}qOn|\}}|dkrw|dkrwtStSdS(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.
        R1R
g�?tzerotdataiR@N(saxesg�?(sdatai(RBRtcbooktis_string_liketTrueR(Rtpositiont
position_typetamount((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/spines.pyt
is_frame_like�s
		cC s�|jdkrdS|jdkr3|jdkrI|jjj\}}n:|jd
krp|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}
|jdkru||
d<||
d<n6|jdkr�||
d<||
d<ntdt��|
|j_dS(s3automatically set spine bounds to the view intervalR+NR"R#R$R%sunknown spine spine_type: %si����iis#unable to set bounds for spine "%s"(sleftsright(stopsbottom(sleftsright(stopsbottom(sleftsright(ii(ii(sbottomstop(ii(ii(R
RRR
tviewLimt	intervalyt	intervalxt
ValueErrorRtdataLimt
get_ytickst
get_xtickstlisttsorttnptarraytlentmaxtminRtvertices(Rtlowthightviewlim_lowtviewlim_hightdatalim_lowtdatalim_highttickstcondttickvalstv1((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/spines.pyt_adjust_location�sf	
	

	






cC s |j�tt|�j|�S(N(RgRRtdraw(Rtrenderer((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/spines.pyRhs
cC s�|j�|j}tj|�rO|dkr7d}qO|dkrOd}qOn|\}}|dkr:|dkr�dtj�f|_q�|jdkridd	6dd
6dd6dd6|j}||dd}||dd}dtj|||j	j
�f|_q�tjd|j�dtj�f|_nN|dkr�|jdkr�dtj
jdddd|d�f|_q�|jdkr�dtj
jddddd|�f|_q�tjd|j�dtj�f|_n�|dkr�|jdkr)dtj
�j|d�f|_q�|jdkr\dtj
�jd|�f|_q�tjd|j�dtj�f|_ndS(s5calculate the offset transform performed by the spineR1R
g�?RERFiR@tidentityR"R#R$R%i����igR@tposts2unknown spine type "%s": no spine offset performedtpreN(saxesg�?(sdatai(sleftsrightstopsbottom(i����i(ii(ii����(ii(sleftsright(sbottomstop(sleftsright(sbottomstop(RBRRGRHRRt_spine_transformR
tScaledTranslationRtdpi_scale_transtwarningstwarnR7tfrom_valuesR:(RRJRKRLt
offset_vectoffset_xtoffset_y((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/spines.pyt_calc_offset_transforms^
		

		!	!	!!	cC s�|dkrn||_|j�|j�}|jd	krXtj||jj�}n*|jd
kr�tj|jj|�}n|j|�|j	dk	r�|j	j�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)

        R1RER"R#R%R$N(scenterszero(sleftsright(sbottomstop(RRvtget_spine_transformR
Rtblended_transform_factoryR
RRRRRC(RRJtttt2((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/spines.pyRAFs	
	
cC s|j�|jS(sget the spine position(RBR(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 transformRFR"R#R$R%sunknown spine spine_type: %stwhichtgridRjRkRls unknown spine_transform type: %sN(sleftsright(stopsbottom(sleftsright(stopsbottom(
RBRmR
t
transScalettransLimitsR0R
RRxRRQtget_yaxis_transformtget_xaxis_transform(Rtwhatthowt
data_xformtresulttbase_transform((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/spines.pyRwus2
	cC s1|jdkrtd��n||f|_dS(sSet the bounds of the spine.R+s5set_bounds() method incompatible with circular spinesN(R
RQR(RR]R^((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�?(tmpathtPathRQ(tclsR
R
R!R R�((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�R�tunit_circleR3(R�R
R1R2R!R R
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*R3R4R=R>R?RBRDRCRMRgRRhRvRAR{RwR�R�tclassmethodR�R�R�(((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/spines.pyRs2	+	
												S	;	*		#		(t
__future__Rt
matplotlibRtmatplotlib.artisttartisttmartistRRtmatplotlib.transformst
transformsRtmatplotlib.linestlinestmlinestmatplotlib.patchestpatchestmpatchestmatplotlib.pathR R�tmatplotlib.cbookRGtnumpyRWRptPatchR(((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/spines.pyt<module>s