KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache
System : Linux server112.speedpacket.com 3.10.0-962.3.2.lve1.5.36.el7.x86_64 #1 SMP Mon May 18 02:16:06 EDT 2020 x86_64
User : equistyl ( 1341)
PHP Version : 8.1.30
Disable Function : NONE
Directory :  /lib64/python2.7/site-packages/matplotlib/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib64/python2.7/site-packages/matplotlib/gridspec.pyo
�
r`]c@ s�dZddlmZmZddlZejZddljZddl	Z
ddlZdefd��YZ
de
fd��YZde
fd	��YZd
efd��YZdS(s�
:mod:`~matplotlib.gridspec` is a module which specifies the location
of the subplot in the figure.

    ``GridSpec``
        specifies the geometry of the grid that a subplot will be
        placed. The number of rows and number of columns of the grid
        need to be set. Optionally, the subplot layout parameters
        (e.g., left, right, etc.) can be tuned.

    ``SubplotSpec``
        specifies the location of the subplot in the given *GridSpec*.


i����(tdivisiontprint_functionNtGridSpecBasecB sweZdZddd�Zd�Zdd�Zddd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
RS(
sm
    A base class of GridSpec that specifies the geometry of the grid
    that a subplot will be placed.
    cC s1|||_|_|j|�|j|�dS(s�
        The number of rows and number of columns of the grid need to
        be set. Optionally, the ratio of heights and widths of rows and
        columns can be specified.
        N(t_nrowst_ncolstset_height_ratiostset_width_ratios(tselftnrowstncolst
height_ratiostwidth_ratios((s9/usr/lib64/python2.7/site-packages/matplotlib/gridspec.pyt__init__!s
cC s|j|jfS(s$get the geometry of the grid, eg 2,3(RR(R((s9/usr/lib64/python2.7/site-packages/matplotlib/gridspec.pytget_geometry.scC sdS(N((Rtfig((s9/usr/lib64/python2.7/site-packages/matplotlib/gridspec.pytget_subplot_params2sicC s4|\}}||||�|||�f}|S(s:
        create and return a SuplotSpec instance.
        ((Rtloctrowspantcolspantloc1tloc2tsubplotspec((s9/usr/lib64/python2.7/site-packages/matplotlib/gridspec.pytnew_subplotspec5s$cC s
||_dS(N(t_col_width_ratios(RR((s9/usr/lib64/python2.7/site-packages/matplotlib/gridspec.pyR>scC s|jS(N(R(R((s9/usr/lib64/python2.7/site-packages/matplotlib/gridspec.pytget_width_ratiosAscC s
||_dS(N(t_row_height_ratios(RR
((s9/usr/lib64/python2.7/site-packages/matplotlib/gridspec.pyRDscC s|jS(N(R(R((s9/usr/lib64/python2.7/site-packages/matplotlib/gridspec.pytget_height_ratiosGsc!C s�|j�\}}|j|�}|j}|j}|j}|j}|j}	|j}
||}||}|||
|d}
|
|
}|jdk	r�|
|}t
t|j��}g|jD]}|||^q�}n
|
g|}dg|g|d}tj
jtjt||���}|||	|d}|	|}|jdk	r�||}t
t|j��}g|jD]}|||^q�}n
|g|}dg|g|d}tj
jtjt||���}gt|�D]}||d|^q�}gt|�D]}||d|d^q}gt|�D]}||d|^qN}gt|�D]}||d|d^qy} |||| fS(so
        return lists of bottom and top position of rows, left and
        right positions of columns.
        iiiN(R
RtlefttrighttbottomttoptwspacethspaceRtNonetfloattsumtnptaddt
accumulatetraveltzipRtrange(!RRRR	tsubplot_paramsRRRRRR ttotWidtht	totHeighttcellHtsepHt	netHeightttrtrtcellHeightst
sepHeightstcellHstcellWtsepWtnetWidtht
cellWidthst	sepWidthstcellWstrowNumtfigTopst
figBottomstcolNumtfigLeftst	figRights((s9/usr/lib64/python2.7/site-packages/matplotlib/gridspec.pytget_grid_positionsKsB						



'
$

'
$+/+/cC s	|j�\}}||}t|t�rxy|\}}Wntk
rZtd��nXt|t�r�|j|�\}}}	nQ|dkr�||7}n||ks�|dkr�td��n||d}}t|t�r|j|�\}
}}	nQ|dkr||7}n||ks1|dkr@td��n||d}
}|||
}|d||d}
n�t|t�r�|j|�\}}
}	|
d8}
nM|dkr�||7}n||ks�|dkr�td��n|d}}
t|||
�S(s:
        create and return a SuplotSpec instance.
        sunrecognized subplot specisindex out of rangeiN(	R
t
isinstancettuplet
ValueErrortslicetindicest
IndexErrorR!tSubplotSpec(RtkeyRR	ttotaltk1tk2trow1trow2t_tcol1tcol2tnum1tnum2((s9/usr/lib64/python2.7/site-packages/matplotlib/gridspec.pyt__getitem__�s@






N(t__name__t
__module__t__doc__R!RR
RRRRRRRART(((s9/usr/lib64/python2.7/site-packages/matplotlib/gridspec.pyRs							8tGridSpecc	B s}eZdZd
d
d
d
d
d
d
d
d�ZddddddgZd�Zd
d	�Zd
�Zd
dd
d
d
d�Z	RS(s�
    A class that specifies the geometry of the grid that a subplot
    will be placed. The location of grid is determined by similar way
    as the SubplotParams.
    cC sY||_||_||_||_||_||_tj|||d|	d|
�dS(s�
        The number of rows and number of columns of the
        grid need to be set. Optionally, the subplot layout parameters
        (e.g., left, right, etc.) can be tuned.
        RR
N(RRRRRR RR(RRR	RRRRRR RR
((s9/usr/lib64/python2.7/site-packages/matplotlib/gridspec.pyR�s
						RRRRRR c	K s�xO|j�D]A\}}||jkr;t|||�q
td|f��q
Wddlm}ddlm}xK|jj	j
�D]7}x.|jjj
D]}t||�sw|jdk	rt|j|�r|jj�j�|krt|jj�|j|jj�qtq�|jdk	r�t|j|�r�|jj�j�|krt|jj�|j|jj�qtq�q�|j�j�}|j�|kr�|j�|j|j�q�q�Wq�WdS(s�
        Update the current values.  If any kwarg is None, default to
        the current value, if set, otherwise to rc.
        s%s is unknown keywordi����(t_pylab_helpers(tSubplotBaseN(t	iteritemst_AllowedKeystsetattrtAttributeErrort
matplotlibRYtmatplotlib.axesRZtGcftfigst
itervaluestcanvastfiguretaxesRBt_sharexR!tget_subplotspectget_gridspect
update_paramstset_positiontfigboxt_shareytget_topmost_subplotspec(	RtkwargstktvRYRZt
figmanagertaxtss((s9/usr/lib64/python2.7/site-packages/matplotlib/gridspec.pytupdate�s*!
!

cC s�ddlm}ddl}|dkrgtg|jD]}|td|f^q5�}||�}n|j|j�}tg|jD]}|t||�f^q��}|j	|�|S(s�
        return a dictionary of subplot layout parameters. The default
        parameters are from rcParams unless a figure attribute is set.
        i����(t
SubplotParamsNsfigure.subplot.(
tmatplotlib.figureRvtcopyR!tdictR\trcParamstsubplotparstgetattrRu(RRRvRxRptkwR{t	update_kw((s9/usr/lib64/python2.7/site-packages/matplotlib/gridspec.pyR�s*1
cC s)g|jD]}t||�r
|^q
S(N(R\R|(RRp((s9/usr/lib64/python2.7/site-packages/matplotlib/gridspec.pytlocally_modified_subplot_paramssgH�z�G�?c
C s�ddlm}m}m}	||jd|�}
d	|
krMtjd�n|d	krh|	|�}n|||j|
|d|d|d|d|�}|j|�d	S(
s^
        Adjust subplot parameters to give specified padding.

        Parameters:

        pad : float
            padding between the figure edge and the edges of subplots, as a fraction of the font-size.
        h_pad, w_pad : float
            padding (height/width) between edges of adjacent subplots.
            Defaults to `pad_inches`.
        rect : if rect is given, it is interpreted as a rectangle
            (left, bottom, right, top) in the normalized figure
            coordinate that the whole subplots area (including
            labels) will fit into. Default is (0, 0, 1, 1).
        i����(tget_subplotspec_listtget_tight_layout_figuretget_renderert	grid_specsgThis figure includes Axes that are not compatible with tight_layout, so its results might be incorrect.tpadth_padtw_padtrectN(	ttight_layoutR�R�R�RfR!twarningstwarnRu(RRtrendererR�R�R�R�R�R�R�tsubplotspec_listRo((s9/usr/lib64/python2.7/site-packages/matplotlib/gridspec.pyR�s	N(
RURVRWR!RR\RuRRR�(((s9/usr/lib64/python2.7/site-packages/matplotlib/gridspec.pyRX�s	$	tGridSpecFromSubplotSpeccB s8eZdZddddd�Zdd�Zd�ZRS(sx
    GridSpec whose subplot layout parameters are inherited from the
    location specified by a given SubplotSpec.
    cC s>||_||_||_tj|||d|d|�dS(s`
        The number of rows and number of columns of the grid need to
        be set. An instance of SubplotSpec is also needed to be set
        from which the layout parameters will be inherited. The wspace
        and hspace of the layout can be optionally specified or the
        default values (from the figure or rcParams) will be used.
        RR
N(t_wspacet_hspacet
_subplot_specRR(RRR	tsubplot_specRR R
R((s9/usr/lib64/python2.7/site-packages/matplotlib/gridspec.pyR?s			c
C s�|dkr#td}td}n|jj}|jj}|jdk	rV|j}n|jdk	rq|j}n|jj|dt	�}|j
\}}}}ddlm}	|	d|d|d|d	|d
|d|�}
|
S(
sC
        return a dictionary of subplot layout parameters.
        sfigure.subplot.hspacesfigure.subplot.wspacet
return_alli����(RvRRRRRR N(
R!RzR{R RR�R�R�tget_positiontFalsetextentsRwRv(RRR RRlRRRRRvtsp((s9/usr/lib64/python2.7/site-packages/matplotlib/gridspec.pyRTs&

	cC s
|jj�S(s@get the topmost SubplotSpec instance associated with the subplot(R�Rn(R((s9/usr/lib64/python2.7/site-packages/matplotlib/gridspec.pyRnusN(RURVRWR!RRRn(((s9/usr/lib64/python2.7/site-packages/matplotlib/gridspec.pyR�:s
!RHcB sAeZdZdd�Zd�Zd�Zed�Zd�Z	RS(sH
    specifies the location of the subplot in the given *GridSpec*.
    cC s;|j�\}}||}||_||_||_dS(s�
        The subplot will occupy the num1-th cell of the given
        gridspec.  If num2 is provided, the subplot will span between
        num1-th cell and num2-th cell.

        The index stars from 0.
        N(R
t	_gridspecRRRS(RtgridspecRRRStrowstcolsRJ((s9/usr/lib64/python2.7/site-packages/matplotlib/gridspec.pyRs
	
		cC s|jS(N(R�(R((s9/usr/lib64/python2.7/site-packages/matplotlib/gridspec.pyRi�scC s.|j�j�\}}|||j|jfS(sc
        get the subplot geometry, eg 2,2,3. Unlike SuplorParams,
        index is 0-based
        (RiR
RRRS(RR�R�((s9/usr/lib64/python2.7/site-packages/matplotlib/gridspec.pyR
�scC sC|j�}|j�\}}|j|�\}}}}	t|j|�\}
}||
}||
}
||}|	|}|jdk	rt|j|�\}}||}||}||}|	|}t||�}t||�}t|
|�}
t||�}nt	j
j||||
�}|r;||
|||fS|SdS(sB
        update the subplot position from fig.subplotpars
        N(RiR
RAtdivmodRRRSR!tmintmaxtmtransformstBboxtfrom_extents(RRR�R�RR	R=R<R?R@R;R>t	figBottomtfigToptfigLefttfigRighttrowNum2tcolNum2t
figBottom2tfigTop2tfigLeft2t	figRight2Rl((s9/usr/lib64/python2.7/site-packages/matplotlib/gridspec.pyR��s.







cC s-|j�}t|d�r%|j�S|SdS(s@get the topmost SubplotSpec instance associated with the subplotRnN(RithasattrRn(RR�((s9/usr/lib64/python2.7/site-packages/matplotlib/gridspec.pyRn�s
N(
RURVRWR!RRiR
R�R�Rn(((s9/usr/lib64/python2.7/site-packages/matplotlib/gridspec.pyRHzs			)(RWt
__future__RRR_Rztmatplotlib.transformst
transformsR�tnumpyR$R�tobjectRRXR�RH(((s9/usr/lib64/python2.7/site-packages/matplotlib/gridspec.pyt<module>s	��@

Anon7 - 2021