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/tight_layout.pyo
�
r`]c@s�dZddlZddlZddlmZmZddlmZejZd�Z	d�Z
d�Zd�Zdd	dddd
�Zd�Zdd�Zd	dddd
�ZdS(s�
This module provides routines to adjust subplot params so that subplots are
nicely fit in the figure. In doing so, only axis labels, tick labels and axes
titles are currently considered.

Internally, it assumes that the margins (left_margin, etc.) which are
differences between ax.get_tightbbox and ax.bbox are independent of axes
position. This may fail if Axes.adjustable is datalim. Also, This will fail
for some cases (for example, left or right margin is affected by xlabel).
i����N(tTransformedBboxtBbox(tFontPropertiescCs|j|jS(N(txmin(t
tight_bboxt	axes_bbox((s=/usr/lib64/python2.7/site-packages/matplotlib/tight_layout.pyt	_get_leftscCs|j|jS(N(txmax(RR((s=/usr/lib64/python2.7/site-packages/matplotlib/tight_layout.pyt
_get_rightscCs|j|jS(N(tymin(RR((s=/usr/lib64/python2.7/site-packages/matplotlib/tight_layout.pyt_get_bottomscCs|j|jS(N(tymax(RR((s=/usr/lib64/python2.7/site-packages/matplotlib/tight_layout.pyt_get_top!sgH�z�G�?c
.
Cs�|\}
}|tdtd�j�d}|d	k	r]|tdtd�j�d}
n|}
|d	k	r�|tdtd�j�d}n|}t|�dkr�td��nt|�t|�kr�td��n|	d	krd	}d	}d	}d	}nD|	\}}}}|r-d|}nd	}|rFd|}nd	}gt|
d|�D]}g^qa}gt|
|d�D]}g^q�}tj}|d	krg}xI|D]>}|g|D]}|j	dt
�^q��}|j|�q�Wnxt|||�D]�\}}\}}|g|D]}|j
|�^q3�}t||jj��}t||�\} }!|d	kr%|| |d|!jt||��|| |d|!djt||��|| ||!jt||��|| d||!jt||��qt||�\}"}#xkt| |"d�D]V}$||$|d|!jt||��||$|d|#djt||��qNWxct|!|#d�D]N}%|| ||%jt||��||"d||%jt||��q�WqW|j�\}&}'|sxtg|d	d	|d�D]}(t|(�^qEdg�}|||&7}n|s�tg||d	|d�D]}(t|(�^q�dg�}|||&7}n|stg|| D]}(t|(�^q�dg�}|||'7}n|s[tg||D]}(t|(�^q(dg�}|||'7}ntd
|dd|d|d
d|�})|dkr(tgt|
�D]B}|||dd|d|dd!D]}(t|(�^q�q��}*|*||&7}*d|||*|d|}+|*|+|)d<n|
dkr�tg|||!D]}(t|(�^qF�},|,|
|'7},d|||,|
d|
}-|,|-|)d<n|)S(s�
    Return a dictionary of subplot parameters so that spacing between
    subplots are adjusted. Note that this function ignore geometry
    information of subplot itself, but uses what is given by
    *nrows_ncols* and *num1num2_list* parameteres. Also, the results could be
    incorrect if some subplots have ``adjustable=datalim``.

    Parameters:

    nrows_ncols
      number of rows and number of columns of the grid.

    num1num2_list
      list of numbers specifying the area occupied by the subplot

    subplot_list
      list of subplots that will be used to calcuate optimal subplot_params.

    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
      [left, bottom, right, top] in normalized (0, 1) figure coordinates.
    tsizes	font.sizegR@itg�?itoriginalNtlefttrighttbottomttoptwspacethspace(RtrcParamstget_size_in_pointstNonetlentRuntimeErrortrangeRtuniontget_positiontTruetappendtzipt
get_tightbboxRttransFiguretinvertedtdivmodRRRR
tget_size_inchestmaxtsumtdict(.tfigtrenderertnrows_ncolst
num1num2_listtsubplot_listtax_bbox_listtpadth_padtw_padtrecttrowstcolst
pad_inchestvpad_inchesthpad_inchestmargin_leftt
margin_bottomtmargin_rightt
margin_topt_rightt_toptitvspacesthspacesRtsubplotstaxtax_bboxtnum1tnum2ttight_bbox_rawRtrow1tcol1trow2tcol2trow_itcol_itfig_width_inchtfig_height_inchtstkwargsRth_axestvspacetv_axes((s=/usr/lib64/python2.7/site-packages/matplotlib/tight_layout.pytauto_adjust_subplotpars%s�#!$$	

''	
%	(==01

E-cCs{|jr|j}nb|j}|rBt|d�rB|j�}n5tjd�ddlm}||�}|j�}|S(Ntget_renderers+tight_layout : falling back to Agg rendereri����(tFigureCanvasAgg(t_cachedRenderertcanvasthasattrRUtwarningstwarntmatplotlib.backends.backend_aggRV(R)R*RXRV((s=/usr/lib64/python2.7/site-packages/matplotlib/tight_layout.pyRU�s		
cCs�g}x�|D]�}|j�}|dkr4|}nt|d�r�|j�}|j�}|j�}|dk	r�||kr�d}q�q�|j�r�d}q�nd}|j|�q
W|S(s�
    Return a list of subplotspec from the given list of axes.  For an
    instance of axes that does not support subplotspec, None is
    inserted in the list.

    If grid_spec is given, None is inserted for those not from
    the given grid_spec.

    tget_subplotspecN(tget_axes_locatorRRYR]tget_topmost_subplotspectget_gridspectlocally_modified_subplot_paramsR(t	axes_listt	grid_spectsubplotspec_listRBtaxes_or_locatortsubplotspectgs((s=/usr/lib64/python2.7/site-packages/matplotlib/tight_layout.pytget_subplotspec_list�s"

	c(Cs2g}g}	g}
g}i}g}
x�t||�D]�\}}|dkrRq4n|j|g�}|s�|j�\}}}}|	j|�|
j|�|
j|�|j|�|j|j|��n|j|�q4Wt|	�}t|
�}g}x|
D]�}|j�\}}}}t||�\}}t||�\}}|dkse|dkrttd��nt||�\}} |dkr�|| }!}"nt||�\}!}"|j|||| ||!d|d||"d|df�qWt	||d||fd|d|d|d|d	|d
|�}#|dk	r.|\}$}%}&}'|$dk	r{|$|#d7}$n|%dk	r�|%|#d7}%n|&dk	r�|&d|#d
8}&n|'dk	r�|'d|#d8}'nt	||d||fd|d|d|d|d	|d
|d|$|%|&|'f�}#n|#S(s+
    Return subplot parameters for tight-layouted-figure with specified
    padding.

    Parameters:

      *fig* : figure instance

      *axes_list* : a list of axes

      *subplotspec_list* : a list of subplotspec associated with each
        axes in axes_list

      *renderer* : renderer instance

      *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).
    iRiR+R,R-R.R/R0R1RRRRR2N(
R Rt
setdefaulttget_geometryRRR&R$RRT((R)RbRdR*R/R0R1R2R-t
nrows_listt
ncols_listR.tsubplot_dicttsubplotspec_list2RBRfRAtmyrowstmycolst_t	max_nrowst	max_ncolsR,R3R4RDREtdiv_rowtmod_rowtdiv_coltmod_coltrowNum1tcolNum1trowNum2tcolNum2RPRRRR((s=/usr/lib64/python2.7/site-packages/matplotlib/tight_layout.pytget_tight_layout_figure
sv	




.	(t__doc__RZt
matplotlibtmatplotlib.transformsRRtmatplotlib.font_managerRRRRR
RRRTRURhR|(((s=/usr/lib64/python2.7/site-packages/matplotlib/tight_layout.pyt<module>
s						�	"

Anon7 - 2021