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/table.pyc
�
r`]c
@ sdZddlmZmZddlZddlZddlmZmZddlm	Z	ddl
mZddlm
Z
ddlmZdd	lmZd
e	fd��YZdefd
��YZeedeeedeedded�Ze
jjdeje��dS(sG
Place a table below the x-axis at location loc.

The table consists of a grid of cells.

The grid need not be rectangular and can have holes.

Cells are added by specifying their row and column.

For the purposes of positioning the cell at (0, 0) is
assumed to be at the top left and the cell at (max_row, max_col)
is assumed to be at bottom right.

You can add additional cells outside this range to have convenient
ways of positioning more interesting grids.

Author    : John Gill <jng@europe.renre.com>
Copyright : 2004 John Gill and John Hunter
License   : matplotlib license

i����(tdivisiontprint_functionN(tArtisttallow_rasterization(t	Rectangle(tis_string_like(t	docstring(tText(tBboxtCellcB s�eZdZdZddedddd�Zd�Zd�Zd�Z	d	�Z
d
�Zd�Ze
d��Zd
�Zd�Zd�Zd�ZRS(s;
    A cell is a Rectangle with some associated text.

    g�������?tktwtc

C s�tj||d|d|d|d|�|jt�|dkrJd}n||_td|dd|d	d
|d|	�|_|jjt�dS(Ntwidththeightt	edgecolort	facecolortrighttxityittexttfontproperties(Rt__init__tset_clip_ontFalsetNonet_locRt_text(
tselftxyR
RRRtfillRtlocR((s6/usr/lib64/python2.7/site-packages/matplotlib/table.pyR)s	

		 cC stj||�dS(N(Rt
set_transform(Rttrans((s6/usr/lib64/python2.7/site-packages/matplotlib/table.pyR >scC s$tj||�|jj|�dS(N(Rt
set_figureR(Rtfig((s6/usr/lib64/python2.7/site-packages/matplotlib/table.pyR"BscC s|jS(sReturn the cell Text intance(R(R((s6/usr/lib64/python2.7/site-packages/matplotlib/table.pytget_textFscC s|jj|�dS(N(Rtset_fontsize(Rtsize((s6/usr/lib64/python2.7/site-packages/matplotlib/table.pyR%JscC s
|jj�S(sReturn the cell fontsize(Rtget_fontsize(R((s6/usr/lib64/python2.7/site-packages/matplotlib/table.pyR'MscC sj|j�}|j|�}xH|dkre||j�kre|d8}|j|�|j|�}qW|S(s# Shrink font size until text fits. i(R'tget_required_widtht	get_widthR%(Rtrenderertfontsizetrequired((s6/usr/lib64/python2.7/site-packages/matplotlib/table.pytauto_set_font_sizeQs!

cC sA|j�sdStj||�|j|�|jj|�dS(N(tget_visibleRtdrawt_set_text_positionR(RR*((s6/usr/lib64/python2.7/site-packages/matplotlib/table.pyR/\s

c	C s�|j|�}|j\}}}}|jjd�||d}|jdkrr|jjd�||d}nX|jdkr�|jjd�|||j}n%|jjd�||d|j}|jj||f�dS(sm Set text up so it draws in the right place.

        Currently support 'left', 'center' and 'right'
        tcenterg@tleftRg�?N(tget_window_extenttboundsRtset_verticalalignmentRtset_horizontalalignmenttPADtset_position(	RR*tbboxtltbRthRR((s6/usr/lib64/python2.7/site-packages/matplotlib/table.pyR0gscC s.|jj|�}|j|j��}|jS(s' Get text bounds in axes co-ordinates. (RR3tinverse_transformedtget_data_transformR4(RR*R9tbboxa((s6/usr/lib64/python2.7/site-packages/matplotlib/table.pytget_text_bounds�scC s.|j|�\}}}}|dd|jS(s# Get width required for this cell. g�?g@(R@R7(RR*R:R;RR<((s6/usr/lib64/python2.7/site-packages/matplotlib/table.pyR(�scK s|jj|�dS(s&update the text properties with kwargsN(Rtupdate(Rtkwargs((s6/usr/lib64/python2.7/site-packages/matplotlib/table.pytset_text_props�sN(t__name__t
__module__t__doc__R7tTrueRRR R"R$R%R'R-RR/R0R@R(RC(((s6/usr/lib64/python2.7/site-packages/matplotlib/table.pyR	"s$									tTablecB sUeZdZidd6dd6dd6dd6d	d
6dd6d
d6dd6dd6dd6dd6dd6dd6dd6dd6dd 6d!d"6d#d$6ZdZd%Zd8d8d&�Zd'�Zd(�Z	e
d)��Zd*�Zd+�Z
d,�ZeZd-�Zd.�Zd/�Zd0�Zed1�Zd2�Zd3�Zd4�Zd5�Zd6�Zd7�ZRS(9s7
    Create a table of cells.

    Table can have (optional) row and column headers.

    Each entry in the table can be either text or patches.

    Column widths and row heights for the table can be specifified.

    Return value is a sequence of text, line and patch instances that make
    up the table
    itbestisupper rightis
upper leftis
lower leftislower rightiscenter leftiscenter rightislower centerisupper centeri	R1i
s	top rightistop leftisbottom lefti
sbottom rightiRiR2ittopitbottomg{�G�z�?cC s�tj|�t|�rZ||jkrZtjd|dj|jj��f�d}nt|�r~|jj|d�}n|j	|j
�||_||_||_
|j|j�g|_i|_g|_g|_t|_d|_dS(NsIUnrecognized location %s. Falling back on bottom; valid locations are
%s	s
	RKi(RRRtcodestwarningstwarntjointiterkeystgetR"tfiguret_axesRt_bboxR t	transAxest_textst_cellst	_autoRowst_autoColumnsRGt
_autoFontsizeRt_cachedRenderer(RtaxRR9((s6/usr/lib64/python2.7/site-packages/matplotlib/table.pyR�s$
	 									cO s_d}t|||�}|j|j�|j|j��|jt�||j||f<dS(s Add a cell to the table. iN(ii(R	R"RRR t
get_transformRRRW(RtrowtcoltargsRBRtcell((s6/usr/lib64/python2.7/site-packages/matplotlib/table.pytadd_cell�s
cC s&|jd|jj|jjjdS(NgR@g333333�?(tFONTSIZERRtdpiRSR9R(R((s6/usr/lib64/python2.7/site-packages/matplotlib/table.pyt_approx_text_height�scC s�|dkr|j}n|dkr3td��n||_|j�sLdS|jd�|j|�|jj�}|j�x"|D]}|j|j	|�q�W|j
d�dS(NsNo renderer definedttable(RR[tRuntimeErrorR.t
open_groupt_update_positionsRWtkeystsortR/tclose_group(RR*Rjtkey((s6/usr/lib64/python2.7/site-packages/matplotlib/table.pyR/�s	



cC stg|jj�D]<}|ddkr|ddkr|j|j|�^q}tj|�}|j|j��S(srGet a bbox, in axes co-ordinates for the cells.

        Only include those in the range (0,0) to (maxRow, maxCol)ii(RWRPR3RtunionR=R](RR*tpostboxesR9((s6/usr/lib64/python2.7/site-packages/matplotlib/table.pyt_get_grid_bbox�s
<cC s�t|j�r|j||�S|jdk	r�g|jj�D]?}|ddkr>|ddkr>|j|j|j�^q>}tj|�}|j	|j
|j�ifStifSdS(sUTest whether the mouse event occurred in the table.

        Returns T/F, {}
        iiN(
tcallablet	_containsR[RRWRPR3RRntcontainsRRR(Rt
mouseeventRoRpR9((s6/usr/lib64/python2.7/site-packages/matplotlib/table.pyRts?cC s
|jj�S(s)Return the Artists contained by the table(RWtvalues(R((s6/usr/lib64/python2.7/site-packages/matplotlib/table.pytget_childrenscC s8g|jj�D]}|j|�^q}tj|�S(s5Return the bounding box of the table in window coords(RWRvR3RRn(RR*RaRp((s6/usr/lib64/python2.7/site-packages/matplotlib/table.pyR3s(cC sti}i}xy|jj�D]h\\}}}|j|d�}t||j��||<|j|d�}t||j��||<qWd}i}	|j�}
|
j�x&|
D]}||	|<|||7}q�Wd}i}|j�}
|
j�|
j�x&|
D]}|||<|||7}qWxE|jj�D]4\\}}}|j	|	|�|j
||�q8WdS(sW Calculate row heights and column widths.

        Position cells accordingly.
        giN(RWt	iteritemst
setdefaulttmaxt
get_heightR)RjRktreversetset_xtset_y(RtwidthstheightsR^R_RaRR
txpostleftstcolstypostbottomstrows((s6/usr/lib64/python2.7/site-packages/matplotlib/table.pyt_do_cell_alignments2"






"cC s|jj|�dS(N(RYtappend(RR_((s6/usr/lib64/python2.7/site-packages/matplotlib/table.pytauto_set_column_widthDscC s�g|jD]}|d|kr
|^q
}d}x3|D]+}|j|}t|j|�|�}q9Wx"|D]}|j|j|�qoWdS(s- Automagically set width for column.
        iiN(RWRzR(t	set_width(RR_R*RmtcellsR
Ratc((s6/usr/lib64/python2.7/site-packages/matplotlib/table.pyt_auto_set_column_widthHs,


cC s
||_dS(s Automatically set font size. N(RZ(Rtvalue((s6/usr/lib64/python2.7/site-packages/matplotlib/table.pyR-WscC s�t|j�dkrdS|jj�dj�}g}xa|jj�D]P\}}|d|jkrmqHn|j|�}t||�}|j|�qHWx$|jj	�D]}|j
|�q�WdS(Nii(tlenRWRvR'RxRYR-tminR�t
itervaluesR%(RR*R+R�RmRaR&((s6/usr/lib64/python2.7/site-packages/matplotlib/table.pyt_auto_set_font_size[scC sLxE|jj�D]4}|j|j�|�|j|j�|�qWdS(s: Scale column widths by xscale and row heights by yscale. N(RWR�R�R)t
set_heightR{(RtxscaletyscaleR�((s6/usr/lib64/python2.7/site-packages/matplotlib/table.pytscalemscC s+x$|jj�D]}|j|�qWdS(sW
        Set the fontsize of the cell text

        ACCEPTS: a float in points
        N(RWR�R%(RR&Ra((s6/usr/lib64/python2.7/site-packages/matplotlib/table.pyR%sscC sYxR|jj�D]A}|j�|j�}}|j||�|j||�qWdS(s+Move all the artists by ox,oy (axes coords)N(RWR�tget_xtget_yR}R~(RtoxtoyR�RR((s6/usr/lib64/python2.7/site-packages/matplotlib/table.pyt_offset}sc C s�x!|jD]}|j||�q
W|jr=|j|�n|j�|j|�}|j\}}}}|jdk	r�|j\}}	}
}|j	|
|||�||}|	|}
|j�nt
t|j��\}}}}}}}}}}}}}}}}}}d|d|}d|d|}
|j
|||fkr_|j|}n|j
|||||fkr�d|||j}n|j
||||fkr�d|||j}
n|j
|||fkr�|j|}
n|j
|||fkrd|d|}n|j
|||fkrJd|d|}
n|j
|||fkrp||}n|j
|||fkr�d|}n|j
|||fkr�d|}
n|j
|||fkr�||}
n|j||
�dS(Ng�?iig�?(RYR�RZR�R�RqR4RTRR�trangeR�RLRtAXESPADR�( RR*R_R9R:R;RR<trltrbtrwtrhR�R�tBESTtURtULtLLtLRtCLtCRtLCtUCtCtTRtTLtBLtBRtRtLtTtB((s6/usr/lib64/python2.7/site-packages/matplotlib/table.pyRi�sJ	



K

cC s|jS(s#return a dict of cells in the table(RW(R((s6/usr/lib64/python2.7/site-packages/matplotlib/table.pyt	get_celld�sN(RDRERFRLRcR�RRRbReRR/RqRtRwtget_child_artistsR3R�R�R�RGR-R�R�R%R�RiR�(((s6/usr/lib64/python2.7/site-packages/matplotlib/table.pyRH�sP

							%					
		7RR2R1RKc
C s�|d
kr?t|�}
t|d�}dg|
g|}nt|�}
t|d�}x&|D]}t|�|ksbt�qbW|d
k	r�t|�|
ks�t�x:|D]}t|�|ks�t�q�Wnd|g|
}|d
krd|g|}nd}|d
kr@|d
k	rYdg|}|d}qYn|d
krYd|
}n|d
k	r�t|�|
ks�t�nd}|d
kr�|	d
k	r�dg|
}d}q�n|	d
kr�d|}	d}n|d
k	r�t|�|
ks�t�n|d
krd|g|
}nt|||�}|j�}xqt|
�D]c}xZt|�D]L}|j|||d||d|d|||d	|||d
|�q[WqHW|d
k	rxQt|�D]@}|jd|d||d|d||d	|	|d
|
�q�Wn|d
k	r�xTt|
�D]F}|j||dd|pJdd|d||d	||d
|�q(W|dkr�|jd�q�n|j|�|S(sd
    TABLE(cellText=None, cellColours=None,
          cellLoc='right', colWidths=None,
          rowLabels=None, rowColours=None, rowLoc='left',
          colLabels=None, colColours=None, colLoc='center',
          loc='bottom', bbox=None)

    Factory function to generate a Table instance.

    Thanks to John Gill for providing the class and table.
    iRRg�?iR
RRRRi����gV瞯�<N(	RR�tAssertionErrorRHRetxrangeRbR�t	add_table(R\tcellTexttcellColourstcellLoct	colWidthst	rowLabelst
rowColourstrowLoct	colLabelst
colColourstcolLocRR9R�R�R^t
rowLabelWidthtoffsetRfRR_((s6/usr/lib64/python2.7/site-packages/matplotlib/table.pyRf�sz





	
(RFt
__future__RRRMtartistRRtpatchesRtcbookRt
matplotlibRRRt
transformsRR	RHRRftinterpdRAtkwdoc(((s6/usr/lib64/python2.7/site-packages/matplotlib/table.pyt<module>s$n�3		a

Anon7 - 2021