
    h`l                         S r SSKrSSKJrJr  SSKJrJr  SSK	J
r
  SSKJr  SSKJr  SS	KJr  SS
KJr   " S S\
5      r\r " S S\5      r\R,                       SS j5       rg)a$  
Tables drawing.

.. note::
    The table implementation in Matplotlib is lightly maintained. For a more
    featureful table implementation, you may wish to try `blume
    <https://github.com/swfiua/blume>`_.

Use the factory function `~matplotlib.table.table` to create a ready-made
table from texts. If you need more control, use the `.Table` class and its
methods.

The table consists of a grid of cells, which are indexed by (row, column).
The cell (0, 0) is positioned at the top left.

Thanks to John Gill for providing the class and table.
    N   )_api
_docstring)Artistallow_rasterization)	Rectangle)Text)Bbox)Path)_is_pandas_dataframec                     ^  \ rS rSrSrSr SrS\SSS.rS	S
SSSSSS.U 4S jjrU 4S jr	U 4S jr
S rS rS rS r\U 4S j5       rS rS rS r\R*                  S 5       r\S 5       r\R2                  S 5       rS rSrU =r$ ) Cell'   z
A cell is a `.Rectangle` with some associated `.Text`.

As a user, you'll most likely not creates cells yourself. Instead, you
should use either the `~matplotlib.table.table` factory function or
`.Table.add_cell`.
g?BRTL BTRL)openclosed
horizontalverticalkwTrightNr   )	edgecolor	facecolorfilltextlocfontpropertiesvisible_edgesc          
         > [         TU ]  XX6XES9  U R                  S5        Xl        Xl        [        US   US   SXyUSS9U l        g)a  
Parameters
----------
xy : 2-tuple
    The position of the bottom left corner of the cell.
width : float
    The cell width.
height : float
    The cell height.
edgecolor : :mpltype:`color`, default: 'k'
    The color of the cell border.
facecolor : :mpltype:`color`, default: 'w'
    The cell facecolor.
fill : bool, default: True
    Whether the cell background is filled.
text : str, optional
    The cell text.
loc : {'right', 'center', 'left'}
    The alignment of the text within the cell.
fontproperties : dict, optional
    A dict defining the font properties of the text. Supported keys and
    values are the keyword arguments accepted by `.FontProperties`.
visible_edges : {'closed', 'open', 'horizontal', 'vertical'} or substring of 'BRTL'
    The cell edges to be drawn with a line: a substring of 'BRTL'
    (bottom, right, top, left), or one of 'open' (no edges drawn),
    'closed' (all edges drawn), 'horizontal' (bottom and top),
    'vertical' (right and left).
)widthheightr   r   r   Fr   r   center)xyclip_onr   r    horizontalalignmentverticalalignmentN)super__init__set_clip_onr!   _locr	   _text)selfxyr#   r$   r   r   r   r   r   r    r!   	__class__s              B/var/www/html/env/lib/python3.13/site-packages/matplotlib/table.pyr,   Cell.__init__:   s^    N 	#, 	 	C* 	BqERUE#.1XO
    c                 2   > [         TU ]  U5        SU l        g NT)r+   set_transformstale)r0   tr2   s     r3   r8   Cell.set_transforml   s    a 
r5   c                 Z   > [         TU ]  U5        U R                  R                  U5        g N)r+   
set_figurer/   )r0   figr2   s     r3   r>   Cell.set_figureq   s"    3

c"r5   c                     U R                   $ )z!Return the cell `.Text` instance.)r/   r0   s    r3   get_textCell.get_textu   s    zzr5   c                 H    U R                   R                  U5        SU l        g)zSet the text fontsize.TN)r/   set_fontsizer9   )r0   sizes     r3   rF   Cell.set_fontsizey   s    

%
r5   c                 6    U R                   R                  5       $ )zReturn the cell fontsize.)r/   get_fontsizerB   s    r3   rJ   Cell.get_fontsize~   s    zz&&((r5   c                     U R                  5       nU R                  U5      nUS:  aU  X0R                  5       :  aB  US-  nU R                  U5        U R                  U5      nUS:  a  X0R                  5       :  a  MB  U$ )z9Shrink font size until the text fits into the cell width.r   )rJ   get_required_width	get_widthrF   )r0   rendererfontsizerequireds       r3   auto_set_font_sizeCell.auto_set_font_size   sv    $$&**84lx..*::MHh'..x8H lx..*::
 r5   c                    > U R                  5       (       d  g [        TU ]	  U5        U R                  U5        U R                  R                  U5        SU l        g )NF)get_visibler+   draw_set_text_positionr/   r9   )r0   rO   r2   s     r3   rV   	Cell.draw   sF    !!X)

!
r5   c                    U R                  U5      nUR                  UR                  S-  -   nU R                  R	                  5       nUS:X  a  UR
                  UR                  S-  -   nOVUS:X  a'  UR
                  UR                  U R                  -  -   nO)UR
                  UR                  SU R                  -
  -  -   nU R                  R                  XS45        g)z.Set text up so it is drawn in the right place.   r%   leftr   N)	get_window_extenty0r$   r/   get_horizontalalignmentx0r#   PADset_position)r0   rO   bboxr'   r   r&   s         r3   rW   Cell._set_text_position   s    %%h/GGdkkAo%jj002(?$**q.(AF]$**txx//A$**DHH55A

'r5   c                     U R                   R                  U5      R                  U R                  5       R	                  5       5      R
                  $ )zI
Return the text bounds as *(x, y, width, height)* in table coordinates.
)r/   r\   transformedget_data_transforminvertedbounds)r0   rO   s     r3   get_text_boundsCell.get_text_bounds   s<     

,,X6T446??AB	r5   c                 T    U R                  U5      u  p#pEUSSU R                  -  -   -  $ )z/Return the minimal required width for the cell.      ?g       @)ri   r`   )r0   rO   lbr   hs         r3   rM   Cell.get_required_width   s.    ))(3
aC3>*++r5   c                 H    U R                   R                  U5        SU l        g)zK
Update the text properties.

Valid keyword arguments are:

%(Text:kwdoc)s
TN)r/   _internal_updater9   )r0   kwargss     r3   set_text_propsCell.set_text_props   s     	

##F+
r5   c                     U R                   $ )z
The cell edges to be drawn with a line.

Reading this property returns a substring of 'BRTL' (bottom, right,
top, left').

When setting this property, you can use a substring of 'BRTL' or one
of {'open', 'closed', 'horizontal', 'vertical'}.
)_visible_edgesrB   s    r3   r!   Cell.visible_edges   s     """r5   c           	      f  ^  Uc  T R                   T l        OUT R                  ;   a  T R                  U   T l        Oo[        U 4S jU 5       5      (       aN  [	        SR                  USR                  T R                  5      SR                  T R                   5      5      5      eUT l        ST l        g )Nc              3   @   >#    U  H  oTR                   ;  v   M     g 7fr=   _edges.0edger0   s     r3   	<genexpr>%Cell.visible_edges.<locals>.<genexpr>   s     =utt{{*us   z=Invalid edge param {}, must only be one of {} or string of {}z, T)r|   rw   _edge_aliasesany
ValueErrorformatjoinr9   r0   values   ` r3   r!   rx      s    ="&++Dd((("&"4"4U";D=u===  "66<f%*%)YYt/A/A%B%)YYt{{%;7=> >
 #(D
r5   c                    ^  [         R                  /nUR                  U 4S jT R                   5       5        [         R                  USS ;  a  [         R                  US'   [        SS/SS/SS/SS/SS//USS9$ )	z*Return a `.Path` for the `.visible_edges`.c              3      >#    U  H5  nUTR                   ;   a  [        R                  O[        R                  v   M7     g 7fr=   )rw   r   LINETOMOVETOr}   s     r3   r    Cell.get_path.<locals>.<genexpr>   s2      %#  4#6#66DKKDKKG#s   =A r   N        rl   T)readonly)r   r   extendr|   	CLOSEPOLY)r0   codess   ` r3   get_pathCell.get_path   s     %% 	% ;;eABi'E"I3Z#sc3Z#sc3ZH 	r5   )r.   r/   rw   r9   r!   )__name__
__module____qualname____firstlineno____doc__r`   r|   r   r,   r8   r>   rC   rF   rJ   rR   r   rV   rW   ri   rM   r   interpdrt   propertyr!   setterr   __static_attributes____classcell__r2   s   @r3   r   r   '   s     C-F%'%+%)%)M # $'0O 0Od
#
)	  (,
 	 	 
# 
#   r5   r   c                   f  ^  \ rS rSrSr0 SS_SS_SS_S	S
_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS _S!S"_S#S$_S%S&0Er SrS'r S?U 4S( jjrS) r	S* r
S+ r\S, 5       r\R                  S- 5       rS. r\S/ 5       rS0 rS1 rS2 rS@S3 jrS4 rS5 rS6 rSAS7 jrS8 rS9 rS: rS; rS< rS= rS>r U =r!$ )BTable   a  
A table of cells.

The table consists of a grid of cells, which are indexed by (row, column).

For a simple table, you'll have a full grid of cells with indices from
(0, 0) to (num_rows-1, num_cols-1), in which the cell (0, 0) is positioned
at the top left. However, you can also add cells with negative indices.
You don't have to add a cell to every grid position, so you can create
tables that have holes.

*Note*: You'll usually not create an empty table from scratch. Instead use
`~matplotlib.table.table` to create a table from data.
bestr   zupper rightr   z
upper leftrZ   z
lower left   zlower right   zcenter left   zcenter right   zlower center   zupper center   r%   	   z	top right
   ztop left   zbottom left   zbottom right   r      r[      top   bottom   g{Gz?c                 "  > [         TU ]  5         [        U[        5      (       aR  X R                  ;  a4  [        SR                  USR                  U R                  5      5      5      eU R                  U   nU R                  UR                  SS95        Xl
        X l        X0l        UR                  5         U R                  UR                  5        0 U l        SU l        / U l        SU l        U R)                  U5        U R+                  S5        g)a  
Parameters
----------
ax : `~matplotlib.axes.Axes`
    The `~.axes.Axes` to plot the table into.
loc : str, optional
    The position of the cell with respect to *ax*. This must be one of
    the `~.Table.codes`.
bbox : `.Bbox` or [xmin, ymin, width, height], optional
    A bounding box to draw the table into. If this is not *None*, this
    overrides *loc*.

Other Parameters
----------------
**kwargs
    `.Artist` properties.
z3Unrecognized location {!r}. Valid locations are
	{}z
	FrootNT)r+   r,   
isinstancestrr   r   r   r   r>   
get_figure_axesr.   _bbox_unstale_viewLimr8   	transAxes_cellsr|   _autoColumns_autoFontsizerr   r-   )r0   axr   rb   rs   r2   s        r3   r,   Table.__init__  s    & 	c3**$ KVCTZZ!89; ; **S/C512
	
 	2<<(!f%r5   c                 J    Sn[        U/UQ7SU R                  0UD6nX`X4'   U$ )z
Create a cell and add it to the table.

Parameters
----------
row : int
    Row index.
col : int
    Column index.
*args, **kwargs
    All other parameters are passed on to `Cell`.

Returns
-------
`.Cell`
    The created cell.

)r   r   r!   )r   edges)r0   rowcolargsrs   r1   cells          r3   add_cellTable.add_cellD  s4    & BB4BdjjB6BSXr5   c                 N   [         R                  " [        US9   US   US   pCUR                  U R                  SS95        UR                  U R                  5       5        UR                  S5        X R                  X44'   SU l        g! [         a  n[	        S5      UeSnAff = f)	z(
Set a custom cell in a given position.
)r   r   r   z0Only tuples length 2 are accepted as coordinatesNFr   T)r   check_isinstancer   	ExceptionKeyErrorr>   r   r8   get_transformr-   r   r9   )r0   positionr   r   r   errs         r3   __setitem__Table.__setitem__\  s     	d.	3{HQK 	U344--/0 $CH
  	3 ) */23	3s   	B	 	
B$BB$c                      U R                   U   $ )z-Retrieve a custom cell from a given position.r   )r0   r   s     r3   __getitem__Table.__getitem__l  s    {{8$$r5   c                     U R                   $ )aF  
The default value of `~.Cell.visible_edges` for newly added
cells using `.add_cell`.

Notes
-----
This setting does currently only affect newly created cells using
`.add_cell`.

To change existing cells, you have to set their edges explicitly::

    for c in tab.get_celld().values():
        c.visible_edges = 'horizontal'

r{   rB   s    r3   r   Table.edgesp  s    " {{r5   c                     Xl         SU l        g r7   )r|   r9   r   s     r3   r   r     s    
r5   c                     U R                   S-  U R                  SS9R                  -  U R                  R                  R
                  -  S-  $ )Ng      R@Tr   g333333?)FONTSIZEr   dpir   rb   r$   rB   s    r3   _approx_text_heightTable._approx_text_height  sG    $tD'A'E'EE

&&'),- 	.r5   c                    Uc  U R                  SS9R                  5       nUc  [        S5      eU R                  5       (       d  g UR	                  SU R                  5       S9  U R                  U5        [        U R                  5       H!  nU R                  U   R                  U5        M#     UR                  S5        SU l        g )NTr   zNo renderer definedtable)gidF)r   _get_rendererRuntimeErrorrU   
open_groupget_gid_update_positionssortedr   rV   close_groupr9   )r0   rO   keys      r3   rV   
Table.draw  s     D1??AH455!!G8x($++&CKK!!(+ ' 	W%
r5   c                 :   U R                   R                  5        VVVs/ s H)  u  u  p#nUS:  d  M  US:  d  M  UR                  U5      PM+     nnnn[        R                  " U5      nUR                  U R                  5       R                  5       5      $ s  snnnf )zm
Get a bbox, in axes coordinates for the cells.

Only include those in the range (0, 0) to (maxRow, maxCol).
r   )r   itemsr\   r
   unionre   r   rg   )r0   rO   r   r   r   boxesrb   s          r3   _get_grid_bboxTable._get_grid_bbox  s     *.):):)<+)<%Zc1H 2!$ 2''1)< 	 + zz%  2 2 4 = = ?@@	+s   BBBc                    U R                  U5      (       a  S0 4$ U R                  SS9R                  5       nUb  U R                  R	                  5        VVVs/ s H)  u  u  p4nUS:  d  M  US:  d  M  UR                  U5      PM+     nnnn[        R                  " U5      nUR                  UR                  UR                  5      0 4$ S0 4$ s  snnnf )NFTr   r   )_different_canvasr   r   r   r   r\   r
   r   containsr&   r'   )r0   
mouseeventrO   r   r   r   r   rb   s           r3   r   Table.contains  s    !!*--"9 ???-;;=-1[[->->-@/-@)#Tq 6%(AX 6T++H5-@  / ::e$D==z||<b@@"9/s   C,C4Cc                 H    [        U R                  R                  5       5      $ )z*Return the Artists contained by the table.)listr   valuesrB   s    r3   get_childrenTable.get_children  s    DKK&&())r5   c                    Uc  U R                  SS9R                  5       nU R                  U5        U R                  R	                  5        Vs/ s H  nUR                  U5      PM     nn[        R                  " U5      $ s  snf )NTr   )r   r   r   r   r   r\   r
   r   )r0   rO   r   r   s       r3   r\   Table.get_window_extent  s{    D1??AHx(![[//131T ''11 	 3zz%  3s   Bc                 &   0 n0 nU R                   R                  5        Hb  u  u  p4nUR                  US5      n[        XeR	                  5       5      X#'   UR                  US5      n[        XuR                  5       5      X'   Md     Sn0 n	[        U5       H  nXU'   XU   -  nM     Sn
0 n[        USS9 H  nXU'   XU   -  n
M     U R                   R                  5        H.  u  u  p4nUR                  X   5        UR                  X   5        M0     g)zF
Calculate row heights and column widths; position cells accordingly.
r   r   T)reverseN)	r   r   
setdefaultmax
get_heightrN   r   set_xset_y)r0   widthsheightsr   r   r   r$   r#   xposleftsyposbottomss               r3   _do_cell_alignmentTable._do_cell_alignment  s   
  $ 1 1 3JS''S1Fv'89GL%%c3/Ee^^%56FK	 !4 &>C#J3KD " '40CCLCL D 1
 !% 1 1 3JSJJuz"JJw|$ !4r5   c                    [         R                  " U5      n[         R                  " UR                  [         R                  5      (       d  [        S5      eU H  nU R                  R                  U5        M      SU l        g)z
Automatically set the widths of given columns to optimal sizes.

Parameters
----------
col : int or sequence of ints
    The indices of the columns to auto-scale.
z'col must be an int or sequence of ints.TN)	np
atleast_1d
issubdtypedtypeinteger	TypeErrorr   appendr9   )r0   r   col1dr   s       r3   auto_set_column_widthTable.auto_set_column_width  s^     c"}}U[["**55EFFD$$T*  
r5   c                    ^ U R                   R                  5        VVs/ s H  u  p4US   U:X  d  M  UPM     nnn[        U4S jU 5       SS9nU H  nUR                  U5        M     gs  snnf )z#Automatically set width for column.r   c              3   D   >#    U  H  oR                  T5      v   M     g 7fr=   )rM   )r~   r   rO   s     r3   r   /Table._auto_set_column_width.<locals>.<genexpr>  s     Mut00::us    r   )defaultN)r   r   r  	set_width)r0   r   rO   r   r   cells	max_widths     `    r3   _auto_set_column_widthTable._auto_set_column_width  sc    '+{{'8'8':L':)#c!fm':LMuM !#	DNN9%  Ms
   A*A*c                     Xl         SU l        g)zAutomatically set font size.TN)r   r9   r   s     r3   rR   Table.auto_set_font_size  s    "
r5   c                    [        U R                  5      S:X  a  g [        [        U R                  R	                  5       5      5      R                  5       n/ nU R                  R                  5        HG  u  pEUS   U R                  ;   a  M  UR                  U5      n[        X&5      nUR                  U5        MI     U R                  R	                  5        H  nUR                  U5        M     g )Nr   r   )lenr   nextiterr   rJ   r   r   rR   minr  rF   )r0   rO   rP   r  r   r   rG   s          r3   _auto_set_font_sizeTable._auto_set_font_size  s    t{{q T[[//123@@B**,IC1v*****84D8*HLL - KK&&(Dh' )r5   c                     U R                   R                  5        HG  nUR                  UR                  5       U-  5        UR	                  UR                  5       U-  5        MI     g)z<Scale column widths by *xscale* and row heights by *yscale*.N)r   r   r  rN   
set_heightr  )r0   xscaleyscalecs       r3   scaleTable.scale  sG    ##%AKK./LL&01 &r5   c                 v    U R                   R                  5        H  nUR                  U5        M     SU l        g)a  
Set the font size, in points, of the cell text.

Parameters
----------
size : float

Notes
-----
As long as auto font size has not been disabled, the value will be
clipped such that the text fits horizontally into the cell.

You can disable this behavior using `.auto_set_font_size`.

>>> the_table.auto_set_font_size(False)
>>> the_table.set_fontsize(20)

However, there is no automatic scaling of the row height so that the
text may exceed the cell boundary.
TN)r   r   rF   r9   )r0   rG   r   s      r3   rF   Table.set_fontsize   s0    * KK&&(Dd# )
r5   c                     U R                   R                  5        HH  nUR                  5       UR                  5       pTUR	                  XA-   5        UR                  XR-   5        MJ     g)z-Move all the artists by ox, oy (axes coords).N)r   r   get_xget_yr  r  )r0   oxoyr0  r&   r'   s         r3   _offsetTable._offset9  sF    ##%A779aggiqGGAFOGGAFO &r5   c                    U R                    H  nU R                  X!5        M     U R                  (       a  U R                  U5        U R	                  5         U R                  U5      nUR                  u  pEpgU R                  bx  [        U R                  [        5      (       a  U R                  R                  u  ppOU R                  u  ppU R                  X-  X-  5        X-
  nX-
  nU R	                  5         GOu[        [        U R                  5      5      u  pnnnnnnnnnnnnnnnnSUS-  -
  U-
  nSUS-  -
  U-
  nU R                  UUU4;   a  U R                  U-
  nU R                  XUUU4;   a  SXF-   U R                  -   -
  nU R                  XUU4;   a  SXW-   U R                  -   -
  nU R                  UUU4;   a  U R                  U-
  nU R                  UUU4;   a  SUS-  -
  U-
  nU R                  UUU4;   a  SUS-  -
  U-
  nU R                  UUU4;   a  XF-   * nU R                  UUU4;   a  SU-
  nU R                  UUU4;   a  SU-
  nU R                  UUU4;   a  XW-   * nU R!                  X5        g )Ng      ?rZ   r   rl   )r   r!  r   r*  r  r   rh   r   r   r
   r1  ranger&  r   r.   AXESPADr:  ) r0   rO   r   rb   rm   rn   r   ro   rlrbrwrhr8  r9  BESTURULLLLRCLCRLCUCCTRTLBLBRRLTBs                                    r3   r   Table._update_positions@  s   
 $$C''6 % $$X. 	!""8,[[
a::!$**d++!%!2!2B!%JJrvrv&BB##% ,1TZZ+A)Tr2r2r2r1RQ1aA+"BA+"ByyRRL(\\A%yyTr1b11!%$,,./yyTr2..!%$,,./yyRRL(\\A%yyRQK'AEkQ&yyRQK'AEkQ&yyRQK'YyyRQK'1WyyRQK'1WyyRQK'YRr5   c                     U R                   $ )z
Return a dict of cells in the table mapping *(row, column)* to
`.Cell`\s.

Notes
-----
You can also directly index into the Table object to access individual
cells::

    cell = table[row, col]

r   rB   s    r3   	get_celldTable.get_celldz  s     {{r5   )r   r   r   r   r   r|   r.   r9   )NNr=   )T)"r   r   r   r   r   r   r   r>  r,   r   r   r   r   r   r   r   r   rV   r   r   r   r\   r  r  r!  rR   r*  r1  rF   r:  r   rW  r   r   r   s   @r3   r   r      s   VQ QQ Q Q	
 Q Q Q Q Q R R R R R R  R!" R#E& IHGG* X0 %  $ \\ .  *
A *!%>"&
($228t r5   r   c                 X   Uc  Uc  [        S5      eUc#  [        U5      n[        US   5      nS/U-  /U-  n[        U5      (       aB  Uc  UR                  nO[        S5      eUc  UR                  nO[        S5      eUR
                  n[        U5      n[        US   5      nU H!  n[        U5      U:w  d  M  [        SU S35      e   UbF  [        U5      U:w  a  [        SU S	35      eU H!  n[        U5      U:w  d  M  [        S
U S35      e   O	SU-  /U-  nUc	  SU-  /U-  nSnUc  Ub  S/U-  nUS   nOUc  SU-  nUb  [        U5      U:w  a  [        SU 35      eSnUc  U	b  S/U-  nOSnOU	c  SU-  n	Uc	  SU-  /U-  n[        XU40 UD6nUUl        UR                  5       n[        U5       H<  n[        U5       H*  nUR                  UU-   UUU   UUU   U   UU   U   US9  M,     M>     Ub0  [        U5       H!  nUR                  SUUU   UUU   U	U   U
S9  M#     UbP  [        U5       H*  nUR                  UU-   SU=(       d    SUUU   UU   US9  M,     US:X  a  UR                  S5        SU;   a  UR                  US   5        U R                  U5        U$ )a  
Add a table to an `~.axes.Axes`.

At least one of *cellText* or *cellColours* must be specified. These
parameters must be 2D lists, in which the outer lists define the rows and
the inner list define the column values per row. Each row must have the
same number of elements.

The table can optionally have row and column headers, which are configured
using *rowLabels*, *rowColours*, *rowLoc* and *colLabels*, *colColours*,
*colLoc* respectively.

For finer grained control over tables, use the `.Table` class and add it to
the Axes with `.Axes.add_table`.

Parameters
----------
cellText : 2D list of str or pandas.DataFrame, optional
    The texts to place into the table cells.

    *Note*: Line breaks in the strings are currently not accounted for and
    will result in the text exceeding the cell boundaries.

cellColours : 2D list of :mpltype:`color`, optional
    The background colors of the cells.

cellLoc : {'right', 'center', 'left'}
    The alignment of the text within the cells.

colWidths : list of float, optional
    The column widths in units of the axes. If not given, all columns will
    have a width of *1 / ncols*.

rowLabels : list of str, optional
    The text of the row header cells.

rowColours : list of :mpltype:`color`, optional
    The colors of the row header cells.

rowLoc : {'left', 'center', 'right'}
    The text alignment of the row header cells.

colLabels : list of str, optional
    The text of the column header cells.

colColours : list of :mpltype:`color`, optional
    The colors of the column header cells.

colLoc : {'center', 'left', 'right'}
    The text alignment of the column header cells.

loc : str, default: 'bottom'
    The position of the cell with respect to *ax*. This must be one of
    the `~.Table.codes`.

bbox : `.Bbox` or [xmin, ymin, width, height], optional
    A bounding box to draw the table into. If this is not *None*, this
    overrides *loc*.

edges : {'closed', 'open', 'horizontal', 'vertical'} or substring of 'BRTL'
    The cell edges to be drawn with a line. See also
    `~.Cell.visible_edges`.

Returns
-------
`~matplotlib.table.Table`
    The created table.

Other Parameters
----------------
**kwargs
    `.Table` properties.

%(Table:kwdoc)s
zZAt least one argument from "cellColours" or "cellText" must be provided to create a table.r   r   z3rowLabels cannot be used alongside Pandas DataFramez3colLabels cannot be used alongside Pandas DataFramez!Each row in 'cellText' must have z columnsz'cellColours' must have z rowsz$Each row in 'cellColours' must have r   rl   z'rowLabels' must be of length r   )r#   r$   r   r   r   r   gV瞯<rP   )r   r&  r   indexcolumnsr   r   r   r   r=  r   r  rF   	add_table)r   cellTextcellColourscellLoc	colWidths	rowLabels
rowColoursrowLoc	colLabels
colColourscolLocr   rb   r   rs   rowscolsr   rowLabelWidthoffsetr   r$   r   s                          r3   r   r     sv   h x/ J K 	K ;;q>"D4K=4' H%%  IRSS ((IRSS??x=Dx{Ds8t@ G' ' ( ( 
 {t#7vUCDDC3x4 !G$(6"3 4 4 
 TzlT) 4ZL4'	 M!tI%aLM		4Z
y>T!=dVDEE F!tIF		4Z
 TzlT) "4*6*EEK&&(F T{;CNN3<!*3 (c 2%0%5c%:&	  (   ;CNN1c!*3 )#*S/%  '  ;CNN3<!.!7% )#*S/%  ' 
 A''+ V6*-.LLLr5   )NNr   NNNr[   NNr%   r   Nr   )r   numpyr  r   r   r   artistr   r   patchesr   r   r	   
transformsr
   pathr   cbookr   r   
CustomCellr   r   r    r5   r3   <module>rs     st   $   /     'B9 BJ 
XF Xv %)%)282:)1C Cr5   