intellecton/venv/lib/python3.12/site-packages/matplotlib/__pycache__/table.cpython-312.pyc

372 lines
33 KiB
Text
Raw Normal View History

<EFBFBD>
<00>Rj`l<00><00><><00>dZddlZddlmZmZddlmZmZddl m
Z
ddl m Z ddl mZdd lmZdd
lmZGd <0B>d e
<EFBFBD>ZeZGd <0A>de<07>Zej, dd<0F><01>Zy)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.
<EFBFBD>N<>)<02>_api<70>
_docstring)<02>Artist<73>allow_rasterization)<01> Rectangle)<01>Text)<01>Bbox)<01>Path)<01>_is_pandas_dataframec<00><><00><00>eZdZdZdZ dZdeddd<07>Zdd d
dd d d d<0E><07>fd<0F>
Z<07>fd<10>Z<08>fd<11>Z d<12>Z
d<13>Z d<14>Z d<15>Z e<0E>fd<16><08>Zd<17>Zd<18>Zd<19>Zej(d<1A><00>Zed<1B><00>Zej0d<1C><00>Zd<1D>Z<19>xZS)<1E>Cellz<6C>
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<><67><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?<3F>BRTL<54><00>BT<42>RL)<04>open<65>closed<65>
horizontal<EFBFBD>vertical<61>k<>wT<77>rightNr)<07> edgecolor<6F> facecolor<6F>fill<6C>text<78>loc<6F>fontproperties<65> visible_edgesc <00><><00><01>t<00> |<00>||||||<05><01>|jd<02>|
|_||_t |d|dd|| |d<05><06>|_y)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).
)<05>width<74>heightrrrFrr<00>center)<07>x<>y<>clip_onrr<00>horizontalalignment<6E>verticalalignmentN)<07>super<65>__init__<5F> set_clip_onr <00>_locr <00>_text) <0C>self<6C>xyr"r#rrrrrrr <00> __class__s <20><>S/home/antigravity/intellecton/venv/lib/python3.12/site-packages/matplotlib/table.pyr+z Cell.__init__:sj<00><><00>N <0E><07><18><12>5<EFBFBD><16>d<EFBFBD>#,<2C> <09> <19> C<01> <0C><18><18><15><1F>*<2A><04><1A><18><04> <09><19>B<EFBFBD>q<EFBFBD>E<EFBFBD>R<EFBFBD><01>U<EFBFBD>E<EFBFBD>#<23>N<EFBFBD>.1<EFBFBD>X<EFBFBD>O<01><04>
<EFBFBD>c<00>2<00><01>t<00>|<00>|<01>d|_y<00>NT)r*<00> set_transform<72>stale)r/<00>tr1s <20>r2r6zCell.set_transformls<00><><00> <0A><07><1D>a<EFBFBD> <20><19><04>
r3c<00>Z<00><01>t<00>|<00>|<01>|jj|<01>y<00>N)r*<00>
set_figurer.)r/<00>figr1s <20>r2r;zCell.set_figureqs"<00><><00> <0A><07><1A>3<EFBFBD><1F> <0C>
<EFBFBD>
<EFBFBD><1D><1D>c<EFBFBD>"r3c<00><00>|jS)z!Return the cell `.Text` instance.)r.<00>r/s r2<00>get_textz Cell.get_textus <00><00><13>z<EFBFBD>z<EFBFBD>r3c<00>H<00>|jj|<01>d|_y)zSet the text fontsize.TN)r.<00> set_fontsizer7)r/<00>sizes r2rAzCell.set_fontsizeys<00><00> <0C>
<EFBFBD>
<EFBFBD><1F><1F><04>%<25><19><04>
r3c<00>6<00>|jj<00>S)zReturn the cell fontsize.)r.<00> get_fontsizer>s r2rDzCell.get_fontsize~s<00><00><13>z<EFBFBD>z<EFBFBD>&<26>&<26>(<28>(r3c<00><><00>|j<00>}|j|<01>}|dkDrS||j<00>kDr@|dz}|j|<02>|j|<01>}|dkDr||j<00>kDr<01>@|S)z9Shrink font size until the text fits into the cell width.r)rD<00>get_required_width<74> get_widthrA)r/<00>renderer<65>fontsize<7A>requireds r2<00>auto_set_font_sizezCell.auto_set_font_size<7A>sz<00><00><17>$<24>$<24>&<26><08><17>*<2A>*<2A>8<EFBFBD>4<><08><16><11>l<EFBFBD>x<EFBFBD>$<24>.<2E>.<2E>*:<3A>:<3A> <14><01>M<EFBFBD>H<EFBFBD> <10> <1D> <1D>h<EFBFBD> '<27><1B>.<2E>.<2E>x<EFBFBD>8<>H<EFBFBD><17><11>l<EFBFBD>x<EFBFBD>$<24>.<2E>.<2E>*:<3A>:<3A>
<18>r3c<00><><00><01>|j<00>syt<00>|<00> |<01>|j|<01>|jj|<01>d|_y)NF)<06> get_visibler*<00>draw<61>_set_text_positionr.r7)r/rHr1s <20>r2rNz Cell.draw<61>sC<00><><00><13><1F><1F>!<21> <12> <0A><07> <0C>X<EFBFBD><1E> <0C><1F><1F><08>)<29> <0C>
<EFBFBD>
<EFBFBD><0F><0F><08>!<21><1A><04>
r3c<00><><00>|j|<01>}|j|jdz z}|jj <00>}|dk(r|j
|j dz z}nU|dk(r'|j
|j |jzz}n)|j
|j d|jz
zz}|jj||f<02>y)z.Set text up so it is drawn in the right place.<2E>r$<00>leftrN) <09>get_window_extent<6E>y0r#r.<00>get_horizontalalignment<6E>x0r"<00>PAD<41> set_position)r/rH<00>bboxr&rr%s r2rOzCell._set_text_position<6F>s<><00><00><13>%<25>%<25>h<EFBFBD>/<2F><04> <10>G<EFBFBD>G<EFBFBD>d<EFBFBD>k<EFBFBD>k<EFBFBD>A<EFBFBD>o<EFBFBD> %<25><01><12>j<EFBFBD>j<EFBFBD>0<>0<>2<><03> <0E>(<28>?<3F><14><07><07>$<24>*<2A>*<2A>q<EFBFBD>.<2E>(<28>A<EFBFBD> <10>F<EFBFBD>]<5D><14><07><07>$<24>*<2A>*<2A>t<EFBFBD>x<EFBFBD>x<EFBFBD>/<2F>/<2F>A<EFBFBD><14><07><07>$<24>*<2A>*<2A><01>D<EFBFBD>H<EFBFBD>H<EFBFBD> <0C>5<>5<>A<EFBFBD> <0C>
<EFBFBD>
<EFBFBD><1F><1F><11>A<EFBFBD><06>'r3c<00><><00>|jj|<01>j|j<00>j <00><00>j
S)zY
Return the text bounds as *(x, y, width, height)* in table coordinates.
)r.rS<00> transformed<65>get_data_transform<72>inverted<65>bounds)r/rHs r2<00>get_text_boundszCell.get_text_bounds<64>s<<00><00><15>
<EFBFBD>
<EFBFBD>,<2C>,<2C>X<EFBFBD>6<><1C><1B>T<EFBFBD>4<>4<>6<>?<3F>?<3F>A<>B<><17><16> r3c<00>X<00>|j|<01>\}}}}|dd|jzzzS)z/Return the minimal required width for the cell.<2E><00>?g@)r_rW)r/rH<00>l<>br<00>hs r2rFzCell.get_required_width<74>s2<00><00><19>)<29>)<29>(<28>3<>
<EFBFBD><01>1<EFBFBD>a<EFBFBD><11><10>C<EFBFBD>3<EFBFBD><14><18><18>><3E>*<2A>+<2B>+r3c <00>H<00>|jj|<01>d|_y)zk
Update the text properties.
Valid keyword arguments are:
%(Text:kwdoc)s
TN)r.<00>_internal_updater7)r/<00>kwargss r2<00>set_text_propszCell.set_text_props<70>s<00><00> <0A>
<EFBFBD>
<EFBFBD>#<23>#<23>F<EFBFBD>+<2B><19><04>
r3c<00><00>|jS)a"
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'}.
)<01>_visible_edgesr>s r2r zCell.visible_edges<65>s<00><00><14>"<22>"<22>"r3c <00>p<00><00>|<01><19>j<00>_d<04>_y|<01>jvr<1C>j|<00>_d<04>_yt<00>fd<01>|D<00><00>rNt dj |dj <00>j<00>dj <00>j<00><00><00><00>|<01>_d<04>_y)Nc3<00>:<00>K<00>|]}|<01>jv<01><01><00>y<00>wr:<00><01>_edges<65><03>.0<EFBFBD>edger/s <20>r2<00> <genexpr>z%Cell.visible_edges.<locals>.<genexpr><3E>s<00><><00><><00>=<3D>t<EFBFBD>4<EFBFBD>t<EFBFBD>{<7B>{<7B>*<2A>=<3D>s<00>z=Invalid edge param {}, must only be one of {} or string of {}z, T)rnrj<00> _edge_aliases<65>any<6E>
ValueError<EFBFBD>format<61>joinr7<00>r/<00>values` r2r zCell.visible_edges<65>s<><00><><00> <10>=<3D>"&<26>+<2B>+<2B>D<EFBFBD> <1F><1A><04>
<EFBFBD><13>d<EFBFBD>(<28>(<28> (<28>"&<26>"4<>"4<>U<EFBFBD>";<3B>D<EFBFBD> <1F><1A><04>
<EFBFBD><13>=<3D>u<EFBFBD>=<3D>=<3D> <20>"6<>6<<3C>f<EFBFBD>%*<2A>%)<29>Y<EFBFBD>Y<EFBFBD>t<EFBFBD>/A<>/A<>%B<>%)<29>Y<EFBFBD>Y<EFBFBD>t<EFBFBD>{<7B>{<7B>%;<3B>7=<3D>><3E>><3E>
#(<28>D<EFBFBD> <1F><19><04>
r3c<00><><00><00>tjg}|j<00>fd<01><08>jD<00><00>tj|ddvrtj|d<tddgddgddgddgddgg|d<07><08>S) z*Return a `.Path` for the `.visible_edges`.c3<00>z<00>K<00>|]2}|<01>jvrtjntj<00><01><00>4y<00>wr:)rjr <00>LINETO<54>MOVETOros <20>r2rrz Cell.get_path.<locals>.<genexpr><3E>s3<00><><00><><00>%<25><14> <20>4<EFBFBD>#6<>#6<>6<>D<EFBFBD>K<EFBFBD>K<EFBFBD>D<EFBFBD>K<EFBFBD>K<EFBFBD> G<>%<25>s<00>8;rN<><4E><EFBFBD><EFBFBD><EFBFBD><EFBFBD>raT)<01>readonly)r r}<00>extendrn<00> CLOSEPOLY)r/<00>codess` r2<00>get_pathz Cell.get_path<74>s<><00><><00><15><1B><1B> <0A><05> <0A> <0C> <0C>%<25><1C> <0B> <0B>%<25> %<25> <10>;<3B>;<3B>e<EFBFBD>A<EFBFBD>B<EFBFBD>i<EFBFBD> '<27><1C><0E><0E>E<EFBFBD>"<22>I<EFBFBD><13><11>3<EFBFBD>Z<EFBFBD>#<23>s<EFBFBD><1A>c<EFBFBD>3<EFBFBD>Z<EFBFBD>#<23>s<EFBFBD><1A>c<EFBFBD>3<EFBFBD>Z<EFBFBD> H<> <11><19><0E> r3)<1B>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__doc__rWrnrsr+r6r;r?rArDrKrrNrOr_rFr<00>interpdrh<00>propertyr <00>setterr<72><00> __classcell__<5F>r1s@r2rr's<><00><><00><08> <0E>C<EFBFBD>-<2D> <13>F<EFBFBD>%'<27>%+<2B>%)<29>%)<29><17>M<EFBFBD><1F>#<23><1A><18><1C> $<24>'<27> 0O<01>d<1A>
#<23><1A><1A>
)<29> <18><19><1B><19><1B> (<28><19>,<2C>
<10><17><17> <1A><18> <1A><0E>
#<23><0E>
#<23><13><19><19> <1A><1A> <1A> r3rc<00>V<00><00>eZdZdZidd<03>dd<05>dd<07>dd <09>d
d <0B>d d <0A>dd<0F>dd<11>dd<13>dd<15>dd<17>dd<19>dd<1B>dd<1D>dd<1F>d d!<21>d"d#<23>d$d%i<01>Z dZd&Z d=<3D>fd'<27> Zd(<28>Zd)<29>Z d*<2A>Z
e d+<2B><00>Z e jd,<2C><00>Z d-<2D>Zed.<2E><00>Zd/<2F>Zd0<64>Zd1<64>Zd>d2<64>Zd3<64>Zd4<64>Zd5<64>Zd?d6<64>Zd7<64>Zd8<64>Zd9<64>Zd:<3A>Zd;<3B>Zd<<3C>Z<1E>xZS)@<40>TableaD
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.
<20>bestrz upper rightrz
upper leftrQz
lower left<66>z lower right<68>z center left<66>z center right<68>z lower center<65>z upper center<65>r$<00> z top right<68>
ztop left<66> z bottom left<66> z bottom right<68> r<00>rR<00><00>top<6F><00>bottom<6F>g{<14>G<EFBFBD>z<EFBFBD>?c <00>"<00><01>t<00>|<00><00>t|t<00>rQ||jvr4t dj |dj|j<00><00><00><00>|j|}|j|jd<03><04><00>||_
||_ ||_ |j<00>|j|j<00>i|_d|_g|_d|_|j)|<04>|j+d<03>y)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<><01>rootNT)r*r+<00>
isinstance<EFBFBD>strr<72>rurvrwr;<00>
get_figure<EFBFBD>_axesr-<00>_bbox<6F>_unstale_viewLimr6<00> transAxes<65>_cellsrn<00> _autoColumns<6E> _autoFontsizerfr,)r/<00>axrrYrgr1s <20>r2r+zTable.__init__s<><00><><00>& <0E><07><18><1A> <15>c<EFBFBD>3<EFBFBD> <1F><12>$<24>*<2A>*<2A>$<24> <20>K<><1B>V<EFBFBD>C<EFBFBD><16><1B><1B>T<EFBFBD>Z<EFBFBD>Z<EFBFBD>!8<>9<>;<3B>;<3B><17>*<2A>*<2A>S<EFBFBD>/<2F>C<EFBFBD> <0C><0F><0F><02> <0A> <0A>5<EFBFBD> <0A>1<>2<><17><04>
<EFBFBD><17><04> <09><19><04>
<EFBFBD> <0B><1B><1B><1D> <0C><1A><1A>2<EFBFBD><<3C><<3C>(<28><18><04> <0B><1A><04> <0B><1E><04><19>!<21><04><1A> <0C><1D><1D>f<EFBFBD>%<25> <0C><18><18><15>r3c<00>N<00>d}t|g|<03><01>d|ji|<04><01>}||||f<|S)aV
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.
)rrr )r<00>edges)r/<00>row<6F>col<6F>argsrgr0<00>cells r2<00>add_cellzTable.add_cellDs8<00><00>&<14><02><13>B<EFBFBD>B<>4<EFBFBD>B<>d<EFBFBD>j<EFBFBD>j<EFBFBD>B<>6<EFBFBD>B<><04><1D><04>S<EFBFBD>#<23>X<EFBFBD><0E><13> r3c<00>\<00>tjt|<02><01> |d|d}}|j |j d<06><07><00>|j|j<00><00>|jd<06>||j||f<d|_ y#t$r}t d<04>|<05>d}~wwxYw) z8
Set a custom cell in a given position.
)r<>rrz0Only tuples length 2 are accepted as coordinatesNFr<46>T) r<00>check_isinstancer<00> Exception<6F>KeyErrorr;r<>r6<00> get_transformr,r<>r7)r/<00>positionr<6E>r<>r<><00>errs r2<00> __setitem__zTable.__setitem__\s<><00><00> <0A><1D><1D>d<EFBFBD><14>.<2E> 3<><1F><01>{<7B>H<EFBFBD>Q<EFBFBD>K<EFBFBD><13>C<EFBFBD> <0A><0F><0F><04><0F><0F>U<EFBFBD><0F>3<>4<> <0C><1A><1A>4<EFBFBD>-<2D>-<2D>/<2F>0<> <0C><18><18><15><1F> $<24><04> <0B> <0B>C<EFBFBD><13>H<EFBFBD><1D><19><04>
<EFBFBD><EFBFBD><19> 3<><1A>)<29>*<2A>/2<> 3<><33> 3<>s<00>
B<00> B+<03> B&<03>&B+c<00> <00>|j|S)z-Retrieve a custom cell from a given position.<2E>r<>)r/r<>s r2<00> __getitem__zTable.__getitem__ls<00><00><13>{<7B>{<7B>8<EFBFBD>$<24>$r3c<00><00>|jS)a<>
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'
rmr>s r2r<>z Table.edgesps<00><00>"<14>{<7B>{<7B>r3c<00> <00>||_d|_yr5)rnr7rxs r2r<>z Table.edges<65>s<00><00><1B><04> <0B><19><04>
r3c<00><><00>|jdz |jd<02><03>jz|jjj
z dzS)NgR@Tr<54>g333333<33>?)<06>FONTSIZEr<45><00>dpir<69>rYr#r>s r2<00>_approx_text_heightzTable._approx_text_height<68>sG<00><00><14> <0A> <0A><04>$<24>t<EFBFBD><EFBFBD><EFBFBD>D<EFBFBD><EFBFBD>'A<>'E<>'E<>E<><14>
<EFBFBD>
<EFBFBD><0F><0F>&<26>&<26>'<27>),<2C>-<2D> .r3c<00><><00>|<01> |jd<01><02>j<00>}|<01> td<03><00>|j<00>sy|j d|j <00><00><05>|j |<01>t|j<00>D] }|j|j|<01><00>"|jd<04>d|_ y)NTr<54>zNo renderer defined<65>table)<01>gidF) r<><00> _get_renderer<65> RuntimeErrorrM<00>
open_group<EFBFBD>get_gid<69>_update_positions<6E>sortedr<64>rN<00> close_groupr7)r/rH<00>keys r2rNz
Table.draw<61>s<><00><00> <14> <1B><1B><EFBFBD><EFBFBD>D<EFBFBD><EFBFBD>1<>?<3F>?<3F>A<>H<EFBFBD> <13> <1B><1E>4<>5<> 5<><13><1F><1F>!<21> <12><10><1B><1B>G<EFBFBD><14><1C><1C><1E><1B>8<> <0C><1E><1E>x<EFBFBD>(<28><19>$<24>+<2B>+<2B>&<26> ,<2C>C<EFBFBD> <10>K<EFBFBD>K<EFBFBD><03> <1C> !<21> !<21>(<28> +<2B> ,<2C> <11><1C><1C>W<EFBFBD>%<25><1A><04>
r3c<00>(<00>|jj<00>D<00><02><03>cgc]#\\}}}|dk\r|dk\r|j|<01><00><02>%}}}}tj|<05>}|j |j <00>j<00><00>Scc}}}w)z<>
Get a bbox, in axes coordinates for the cells.
Only include those in the range (0, 0) to (maxRow, maxCol).
r)r<><00>itemsrSr
<00>unionr[r<>r])r/rHr<>r<>r<><00>boxesrYs r2<00>_get_grid_bboxzTable._get_grid_bbox<6F>s<><00><00>*.<2E><1B><1B>):<3A>):<3A>)<<3C>+<2B>+<2B>%<25>Z<EFBFBD>c<EFBFBD>3<EFBFBD><14><17>1<EFBFBD>H<EFBFBD><13><01><18><16>'<27>'<27><08>1<>+<2B><05>+<2B><14>z<EFBFBD>z<EFBFBD>%<25> <20><04><13><1F><1F><04> 2<> 2<> 4<> =<3D> =<3D> ?<3F>@<40>@<40><> +s<00>(B c<00><><00>|j|<01>rdifS|jd<02><03>j<00>}|<02><>|jj <00>D<00><03><04>cgc]#\\}}}|dk\r|dk\r|j |<02><00><02>%}}}}t j|<06>}|j|j|j<00>ifSdifScc}}}w)NFTr<54>r) <0B>_different_canvasr<73>r<>r<>r<>rSr
r<><00>containsr%r&)r/<00>
mouseeventrHr<>r<>r<>r<>rYs r2r<>zTable.contains<6E>s<><00><00> <0F> !<21> !<21>*<2A> -<2D><18>"<22>9<EFBFBD> <1C><18>?<3F>?<3F><04>?<3F>-<2D>;<3B>;<3B>=<3D><08> <13> <1F>-1<>[<5B>[<5B>-><3E>-><3E>-@<40>/<2F>/<2F>)<29><1A>#<23>s<EFBFBD>T<EFBFBD><1B>q<EFBFBD><08>S<EFBFBD>A<EFBFBD>X<EFBFBD><1A>+<2B>+<2B>H<EFBFBD>5<>/<2F>E<EFBFBD>/<2F><18>:<3A>:<3A>e<EFBFBD>$<24>D<EFBFBD><17>=<3D>=<3D><1A><1C><1C>z<EFBFBD>|<7C>|<7C><<3C>b<EFBFBD>@<40> @<40><18>"<22>9<EFBFBD> <1C><> /s<00>(Cc<00>H<00>t|jj<00><00>S)z*Return the Artists contained by the table.)<03>listr<74><00>valuesr>s r2<00> get_childrenzTable.get_children<65>s<00><00><13>D<EFBFBD>K<EFBFBD>K<EFBFBD>&<26>&<26>(<28>)<29>)r3c<00><00>|<01> |jd<01><02>j<00>}|j|<01>|jj <00>D<00>cgc]}|j |<01><00><02>}}t j|<03>Scc}w)NTr<54>)r<>r<>r<>r<>r<>rSr
r<>)r/rHr<>r<>s r2rSzTable.get_window_extent<6E>sx<00><00> <13> <1B><1B><EFBFBD><EFBFBD>D<EFBFBD><EFBFBD>1<>?<3F>?<3F>A<>H<EFBFBD> <0C><1E><1E>x<EFBFBD>(<28>!<21>[<5B>[<5B>/<2F>/<2F>1<>3<><19><16>'<27>'<27><08>1<>3<><05>3<><13>z<EFBFBD>z<EFBFBD>%<25> <20> <20><>3s<00>A?c<00>4<00>i}i}|jj<00>D]f\\}}}|j|d<01>}t||j <00><00>||<|j|d<01>}t||j <00><00>||<<00>hd}i} t |<01>D]}|| |<|||z }<08>d}
i} t |d<03><04>D]}|
| |<|
||z }
<EFBFBD>|jj<00>D]0\\}}}|j| |<00>|j| |<00><00>2y)zV
Calculate row heights and column widths; position cells accordingly.
rrT)<01>reverseN) r<>r<><00>
setdefault<EFBFBD>max<61>
get_heightrGr<><00>set_x<5F>set_y) r/<00>widths<68>heightsr<73>r<>r<>r#r"<00>xpos<6F>lefts<74>ypos<6F>bottomss r2<00>_do_cell_alignmentzTable._do_cell_alignment<6E>s;<00><00>
<14><06><14><07> $<24> <0B> <0B> 1<> 1<> 3<> 7<> <1C>J<EFBFBD>S<EFBFBD>#<23><04><1C>'<27>'<27><03>S<EFBFBD>1<>F<EFBFBD><1E>v<EFBFBD>t<EFBFBD><EFBFBD><EFBFBD>'8<>9<>G<EFBFBD>C<EFBFBD>L<EFBFBD><1A>%<25>%<25>c<EFBFBD>3<EFBFBD>/<2F>E<EFBFBD><1D>e<EFBFBD>T<EFBFBD>^<5E>^<5E>%5<>6<>F<EFBFBD>3<EFBFBD>K<EFBFBD>  7<><11><04><12><05><19>&<26>><3E> <20>C<EFBFBD><1D>E<EFBFBD>#<23>J<EFBFBD> <10>F<EFBFBD>3<EFBFBD>K<EFBFBD> <1F>D<EFBFBD> <20><11><04><14><07><19>'<27>4<EFBFBD>0<> !<21>C<EFBFBD><1F>G<EFBFBD>C<EFBFBD>L<EFBFBD> <10>G<EFBFBD>C<EFBFBD>L<EFBFBD> <20>D<EFBFBD> !<21>
!%<25> <0B> <0B> 1<> 1<> 3<> %<25> <1C>J<EFBFBD>S<EFBFBD>#<23><04> <10>J<EFBFBD>J<EFBFBD>u<EFBFBD>S<EFBFBD>z<EFBFBD> "<22> <10>J<EFBFBD>J<EFBFBD>w<EFBFBD>s<EFBFBD>|<7C> $<24> %r3c<00><><00>tj|<01>}tj|jtj<00>s t d<01><00>|D]}|j j|<03><00>d|_y)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) <09>np<6E>
atleast_1d<EFBFBD>
issubdtype<EFBFBD>dtype<70>integer<65> TypeErrorr<72><00>appendr7)r/r<><00>col1dr<64>s r2<00>auto_set_column_widthzTable.auto_set_column_width<74>s`<00><00><13> <0A> <0A>c<EFBFBD>"<22><05><11>}<7D>}<7D>U<EFBFBD>[<5B>[<5B>"<22>*<2A>*<2A>5<><1B>E<>F<> F<><19> +<2B>D<EFBFBD> <10> <1D> <1D> $<24> $<24>T<EFBFBD> *<2A> +<2B><1A><04>
r3c<00><><00><02>|jj<00>D<00><03>cgc]\}}|d|k(s<01>|<04><02>}}}t<00>fd<02>|D<00>d<03><04>}|D]}|j|<06><00>ycc}}w)z#Automatically set width for column.rc3<00>@<00>K<00>|]}|j<00><02><00><01><00>y<00>wr:)rF)rpr<>rHs <20>r2rrz/Table._auto_set_column_width.<locals>.<genexpr><3E>s<00><><00><><00>M<>t<EFBFBD><14>0<>0<><18>:<3A>M<>s<00>r)<01>defaultN)r<>r<>r<><00> set_width)r/r<>rHr<>r<><00>cells<6C> max_widths ` r2<00>_auto_set_column_widthzTable._auto_set_column_width<74>sg<00><><00>'+<2B>{<7B>{<7B>'8<>'8<>':<3A>L<>)<29>#<23>t<EFBFBD>c<EFBFBD>!<21>f<EFBFBD><03>m<EFBFBD><14>L<><05>L<><17>M<>u<EFBFBD>M<> !<21>#<23> <09><19> &<26>D<EFBFBD> <10>N<EFBFBD>N<EFBFBD>9<EFBFBD> %<25> &<26><>Ms
<00>A&<06>A&c<00> <00>||_d|_y)zAutomatically set font size.TN)r<>r7rxs r2rKzTable.auto_set_font_sizes<00><00>"<22><04><1A><19><04>
r3c<00><><00>t|j<00>dk(rytt|jj <00><00><00>j <00>}g}|jj <00>D]E\}}|d|jvr<01>|j|<01>}t||<06>}|j|<05><00>G|jj <00>D]}|j|<02><00>y)Nrr) <0C>lenr<6E><00>next<78>iterr<72>rDr<>r<>rK<00>minr<6E>rA)r/rHrIr<>r<>r<>rBs r2<00>_auto_set_font_sizezTable._auto_set_font_sizes<><00><00> <0E>t<EFBFBD>{<7B>{<7B> <1B>q<EFBFBD> <20> <12><17><04>T<EFBFBD>[<5B>[<5B>/<2F>/<2F>1<>2<>3<>@<40>@<40>B<><08><12><05><1D><1B><1B>*<2A>*<2A>,<2C> <1F>I<EFBFBD>C<EFBFBD><14><12>1<EFBFBD>v<EFBFBD><14>*<2A>*<2A>*<2A><18><17>*<2A>*<2A>8<EFBFBD>4<>D<EFBFBD><1A>8<EFBFBD>T<EFBFBD>*<2A>H<EFBFBD> <11>L<EFBFBD>L<EFBFBD><14> <1E>  <1F><19>K<EFBFBD>K<EFBFBD>&<26>&<26>(<28> (<28>D<EFBFBD> <10> <1D> <1D>h<EFBFBD> '<27> (r3c<00><><00>|jj<00>D]F}|j|j<00>|z<00>|j |j <00>|z<00><00>Hy)z<Scale column widths by *xscale* and row heights by *yscale*.N)r<>r<>r<>rG<00>
set_heightr<EFBFBD>)r/<00>xscale<6C>yscale<6C>cs r2<00>scalez Table.scalesL<00><00><15><1B><1B>#<23>#<23>%<25> 2<>A<EFBFBD> <0A>K<EFBFBD>K<EFBFBD><01> <0B> <0B> <0A><06>.<2E> /<2F> <0A>L<EFBFBD>L<EFBFBD><11><1C><1C><1E>&<26>0<> 1<> 2r3c<00>r<00>|jj<00>D]}|j|<01><00>d|_y)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<>rAr7)r/rBr<>s r2rAzTable.set_fontsize s5<00><00>*<19>K<EFBFBD>K<EFBFBD>&<26>&<26>(<28> $<24>D<EFBFBD> <10> <1D> <1D>d<EFBFBD> #<23> $<24><19><04>
r3c<00><><00>|jj<00>D]J}|j<00>|j<00>}}|j ||z<00>|j ||z<00><00>Ly)z-Move all the artists by ox, oy (axes coords).N)r<>r<><00>get_x<5F>get_yr<79>r<>)r/<00>ox<6F>oyr r%r&s r2<00>_offsetz Table._offset9sQ<00><00><15><1B><1B>#<23>#<23>%<25> <1C>A<EFBFBD><14>7<EFBFBD>7<EFBFBD>9<EFBFBD>a<EFBFBD>g<EFBFBD>g<EFBFBD>i<EFBFBD>q<EFBFBD>A<EFBFBD> <0A>G<EFBFBD>G<EFBFBD>A<EFBFBD><02>F<EFBFBD>O<EFBFBD> <0A>G<EFBFBD>G<EFBFBD>A<EFBFBD><02>F<EFBFBD>O<EFBFBD> r3c<00><><00>|jD]}|j||<01><00>|jr|j|<01>|j <00>|j |<01>}|j \}}}}|j<00>{t|jt<00>r|jj \}} }
} n|j\}} }
} |j|
|z | |z <00>||z
} | |z
} |j <00><00>nhtt|j<00><00>\}}}}}}}}}}}}}}}}}}d|dz z
|z
} d|dz z
|z
} |j|||fvr|j|z
} |j|||||fvrd||z|jzz
} |j||||fvrd||z|jzz
} |j|||fvr|j|z
} |j|||fvr d|dz z
|z
} |j|||fvr d|dz z
|z
} |j|||fvr||z } |j|||fvrd|z
} |j|||fvrd|z
} |j|||fvr||z } |j!| | <0A>y)Ng<00>?rQrra)r<>r<>r<>rr<>r<>r^r<>r<>r
r <00>rangerr<>r-<00>AXESPADr) r/rHr<>rYrbrcrrd<00>rl<72>rb<72>rw<72>rhrr<00>BEST<53>UR<55>UL<55>LL<4C>LR<4C>CL<43>CR<43>LC<4C>UC<55>C<>TR<54>TL<54>BL<42>BR<42>R<>L<>T<>Bs r2r<>zTable._update_positions@s<><00><00>
<18>$<24>$<24> 7<>C<EFBFBD> <10> '<27> '<27><03>X<EFBFBD> 6<> 7<> <10> <1D> <1D> <10> $<24> $<24>X<EFBFBD> .<2E> <0A><1F><1F>!<21><13>"<22>"<22>8<EFBFBD>,<2C><04><19>[<5B>[<5B>
<EFBFBD><01>1<EFBFBD>a<EFBFBD><11> <0F>:<3A>:<3A> !<21><19>$<24>*<2A>*<2A>d<EFBFBD>+<2B>!%<25><1A><1A>!2<>!2<><0E><02>B<EFBFBD><02>B<EFBFBD>!%<25><1A><1A><0E><02>B<EFBFBD><02>B<EFBFBD> <10>J<EFBFBD>J<EFBFBD>r<EFBFBD>A<EFBFBD>v<EFBFBD>r<EFBFBD>A<EFBFBD>v<EFBFBD> &<26><13>a<EFBFBD><16>B<EFBFBD><13>a<EFBFBD><16>B<EFBFBD> <10> #<23> #<23> %<25>,1<><13>T<EFBFBD>Z<EFBFBD>Z<EFBFBD><1F>+A<> )<29>T<EFBFBD>2<EFBFBD>r<EFBFBD>2<EFBFBD>r<EFBFBD>2<EFBFBD>r<EFBFBD>2<EFBFBD>r<EFBFBD>1<EFBFBD> <0F><12>R<EFBFBD><12>Q<EFBFBD><01>1<EFBFBD>a<EFBFBD><15><01>A<EFBFBD><05>+<2B><11>"<22>B<EFBFBD><15><01>A<EFBFBD><05>+<2B><11>"<22>B<EFBFBD><13>y<EFBFBD>y<EFBFBD>R<EFBFBD><12>R<EFBFBD>L<EFBFBD>(<28><19>\<5C>\<5C>A<EFBFBD>%<25><02><13>y<EFBFBD>y<EFBFBD>T<EFBFBD>2<EFBFBD>r<EFBFBD>1<EFBFBD>b<EFBFBD>1<>1<><16>!<21>a<EFBFBD>%<25>$<24>,<2C>,<2C>.<2E>/<2F><02><13>y<EFBFBD>y<EFBFBD>T<EFBFBD>2<EFBFBD>r<EFBFBD>2<EFBFBD>.<2E>.<2E><16>!<21>a<EFBFBD>%<25>$<24>,<2C>,<2C>.<2E>/<2F><02><13>y<EFBFBD>y<EFBFBD>R<EFBFBD><12>R<EFBFBD>L<EFBFBD>(<28><19>\<5C>\<5C>A<EFBFBD>%<25><02><13>y<EFBFBD>y<EFBFBD>R<EFBFBD><12>Q<EFBFBD>K<EFBFBD>'<27><19>A<EFBFBD><01>E<EFBFBD>k<EFBFBD>Q<EFBFBD>&<26><02><13>y<EFBFBD>y<EFBFBD>R<EFBFBD><12>Q<EFBFBD>K<EFBFBD>'<27><19>A<EFBFBD><01>E<EFBFBD>k<EFBFBD>Q<EFBFBD>&<26><02><13>y<EFBFBD>y<EFBFBD>R<EFBFBD><12>Q<EFBFBD>K<EFBFBD>'<27><19>A<EFBFBD><05>Y<EFBFBD><02><13>y<EFBFBD>y<EFBFBD>R<EFBFBD><12>Q<EFBFBD>K<EFBFBD>'<27><18>1<EFBFBD>W<EFBFBD><02><13>y<EFBFBD>y<EFBFBD>R<EFBFBD><12>Q<EFBFBD>K<EFBFBD>'<27><18>1<EFBFBD>W<EFBFBD><02><13>y<EFBFBD>y<EFBFBD>R<EFBFBD><12>Q<EFBFBD>K<EFBFBD>'<27><19>A<EFBFBD><05>Y<EFBFBD><02> <0C> <0C> <0C>R<EFBFBD><12>r3c<00><00>|jS)a
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<>r>s r2<00> get_celldzTable.get_celldzs<00><00><14>{<7B>{<7B>r3)NNr:)T) r<>r<>r<>r<>r<>r<>rr+r<>r<>r<>r<>r<>r<>r<>rrNr<>r<>r<>rSr<>r<>r<>rKrr rArr<>r.r<>r<>s@r2r<>r<><00>s<><00><><00> <08> <0F>V<EFBFBD>Q<EFBFBD> <0F> <1A>Q<EFBFBD> <0F> <19>Q<EFBFBD> <0F><1A>Q<EFBFBD> <0F><1B>Q<EFBFBD>  <0F>
<1B>Q<EFBFBD>  <0F> <1C>Q<EFBFBD>  <0F><1C>Q<EFBFBD> <0F><1C>Q<EFBFBD> <0F><16>Q<EFBFBD> <0F><19>R<EFBFBD> <0F><18>R<EFBFBD> <0F><1B>R<EFBFBD> <0F><1C>R<EFBFBD> <0F><15>R<EFBFBD> <0F><14>R<EFBFBD> <0F> <13>R<EFBFBD>! <0F>"<16>R<EFBFBD># <0F>E<EFBFBD>&I<01><11>H<EFBFBD><12>G<EFBFBD>G<>* <20>X<14>0<1A> %<25><0E><1B><0E><1B>$ <0B>\<5C>\<5C><1A><12><1A>.<2E><19><1B><19><1B>*
A<01><1D> *<2A>!<21>%<25>><1A>"&<26><1A>
(<28>$2<> <1A>2<1C>8<1D>t r3r<>c <00><00>|<02> |<01> td<01><00>|<01>#t|<02>}t|d<00>}dg|zg|z}t|<01>r@|<05> |j}n td<04><00>|<08> |j}n td<05><00>|j
}t|<01>}t|d<00>}|D]}t|<11>|k7s<01>td|<10>d<07><03><00>|<02>Bt|<02>|k7rtd|<0F>d <09><03><00>|D]}t|<11>|k7s<01>td
|<10>d<07><03><00>n d |zg|z}|<04> d |z g|z}d}|<05>|<06>dg|z}|d}n|<06>d |z}|<05>t|<05>|k7rtd |<0F><00><02><00>d}|<08> | <09>dg|z}n
d}n| <09>d |z} |<02> d |zg|z}t || | fi|<0E><01>}| |_|j<00>}t|<0F>D]<}t|<10>D],}|j||z|||||||||||<03><0F><00>.<00>>|<08>1t|<10>D]#}|jd||||||| ||
<EFBFBD><0F><00>%|<05>Kt|<0F>D]'}|j||zd|xsd||||||<07><0F><00>)|dk(r|jd<10>d|vr|j|d<00>|j|<14>|S)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.rrz3rowLabels 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 rraz'rowLabels' must be of length r)r"r#rrrr~gV瞯<03><rI)rurr <00>index<65>columnsr<73>r<>r<>r<>rr<>r<>rA<00> add_table)r<><00>cellText<78> cellColours<72>cellLoc<6F> colWidths<68> rowLabels<6C>
rowColours<EFBFBD>rowLoc<6F> colLabels<6C>
colColours<EFBFBD>colLocrrYr<>rg<00>rows<77>colsr<73><00> rowLabelWidth<74>offsetr<74>r#r<>s r2r<>r<><00>s<><00><00>h<13><1A>x<EFBFBD>/<2F><18>J<01>K<01> K<01><10><17><12>;<3B><1F><04><12>;<3B>q<EFBFBD>><3E>"<22><04><17>D<EFBFBD>4<EFBFBD>K<EFBFBD>=<3D>4<EFBFBD>'<27><08><1C>H<EFBFBD>%<25> <15> <1C> <20><0E><0E>I<EFBFBD><1C>R<>S<> S<> <14> <1C> <20>(<28>(<28>I<EFBFBD><1C>R<>S<> S<><1B>?<3F>?<3F><08> <0E>x<EFBFBD>=<3D>D<EFBFBD> <0E>x<EFBFBD><01>{<7B> <1B>D<EFBFBD><17>(<28><03> <0E>s<EFBFBD>8<EFBFBD>t<EFBFBD> <1B><1C>@<40><14><06>G'<27>'<27>(<28> (<28>(<28>
<13><1E> <0E>{<7B> <1B>t<EFBFBD> #<23><1C>7<><04>v<EFBFBD>U<EFBFBD>C<>D<> D<><1E> 4<>C<EFBFBD><12>3<EFBFBD>x<EFBFBD>4<EFBFBD><1F> <20>!G<>$(<28>6<EFBFBD><18>"3<>4<>4<> 4<>
<1B>T<EFBFBD>z<EFBFBD>l<EFBFBD>T<EFBFBD>)<29> <0B><11><18><18>4<EFBFBD>Z<EFBFBD>L<EFBFBD>4<EFBFBD>'<27> <09><16>M<EFBFBD><10><18> <15> !<21><1B><04>t<EFBFBD> <0B>I<EFBFBD>%<25>a<EFBFBD>L<EFBFBD>M<EFBFBD> <13> <1B><18>4<EFBFBD>Z<EFBFBD>
<EFBFBD><10><1C> <0E>y<EFBFBD>><3E>T<EFBFBD> !<21><1C>=<3D>d<EFBFBD>V<EFBFBD>D<>E<> E<><0F>F<EFBFBD><10><18> <15> !<21><1B><04>t<EFBFBD> <0B>I<EFBFBD><16>F<EFBFBD> <13> <1B><18>4<EFBFBD>Z<EFBFBD>
<EFBFBD><13><1A><1A>T<EFBFBD>z<EFBFBD>l<EFBFBD>T<EFBFBD>)<29> <0B> <12>"<22>c<EFBFBD>4<EFBFBD> *<2A>6<EFBFBD> *<2A>E<EFBFBD><17>E<EFBFBD>K<EFBFBD> <12> &<26> &<26> (<28>F<EFBFBD><15>T<EFBFBD>{<7B>(<28><03><18><14>;<3B> (<28>C<EFBFBD> <11>N<EFBFBD>N<EFBFBD>3<EFBFBD><16><<3C><13>!*<2A>3<EFBFBD><1E><06> (<28><13> <0A>c<EFBFBD> 2<>%0<><13>%5<>c<EFBFBD>%:<3A>&<26> <1B> (<28> (<28>(<28><11><1C><18><14>;<3B> '<27>C<EFBFBD> <11>N<EFBFBD>N<EFBFBD>1<EFBFBD>c<EFBFBD>!*<2A>3<EFBFBD><1E><06> )<29>#<23><0E>*<2A>S<EFBFBD>/<2F>%<25> <1B> '<27> '<27><11><1C><18><14>;<3B> '<27>C<EFBFBD> <11>N<EFBFBD>N<EFBFBD>3<EFBFBD><16><<3C><12>!.<2E>!7<>%<25><06> )<29>#<23><0E>*<2A>S<EFBFBD>/<2F>%<25> <1B> '<27> '<27>
<19>A<EFBFBD> <1D> <11> '<27> '<27><02> +<2B><12>V<EFBFBD><1B> <0A><1A><1A>6<EFBFBD>*<2A>-<2D>.<2E><06>L<EFBFBD>L<EFBFBD><15><17> <10>Lr3) NNrNNNrRNNr$r<>Nr)r<><00>numpyr<79>rrr<00>artistrr<00>patchesrrr <00>
transformsr
<00>pathr <00>cbookr r<00>
CustomCellr<EFBFBD>r<>r<><00>r3r2<00><module>rIst<00><01><04>$<13><1E>/<2F><1E><16><1C><16>'<27>B<0E>9<EFBFBD>B<0E>J<12>
<EFBFBD>X<1B>F<EFBFBD>X<1B>v  <0C><13><13>%)<29>%)<29>28<32>2:<3A>)1<> C<11><14>Cr3