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

374 lines
36 KiB
Text
Raw Normal View History

<EFBFBD>
<00>RjZt<00><00><><00>dZddlZddlZddlmZddlZddlZddlm Z m
Z
m Z ddl m Z eje<0F>ZGd<06>d<07>ZGd<08>d e<11>ZGd
<EFBFBD>d e<11>ZGd <0C>d <0A>ZGd<0E>d<0F>Zy)a<>
:mod:`~matplotlib.gridspec` contains classes that help to layout multiple
`~.axes.Axes` in a grid-like pattern within a figure.
The `GridSpec` specifies the overall grid structure. Individual cells within
the grid are referenced by `SubplotSpec`\s.
Often, users need not access this module directly, and can use higher-level
methods like `~.pyplot.subplots`, `~.pyplot.subplot_mosaic` and
`~.Figure.subfigures`. See the tutorial :ref:`arranging_axes` for a guide.
<EFBFBD>N)<01>Integral)<03>_api<70>_pylab_helpers<72> _tight_layout)<01>Bboxc<00><><00>eZdZdZdd<03>Zd<04>Zed<05>d<06><07>Zed<08>d <09><07>Zd
<EFBFBD>Z dd <0B>Z
dd <0C>Z d <0A>Z d<0E>Z d<0F>Zd<10>Zd<11>Zed<12><00>Zd<13>Zddddd<16>d<17>Zy)<1B> GridSpecBasezm
A base class of GridSpec that specifies the geometry of the grid
that a subplot will be placed.
Nc<00><><00>t|t<00>r|dkrtd|<01><02><02><00>t|t<00>r|dkrtd|<02><02><02><00>||c|_|_|j |<03>|j |<04>y)a<>
Parameters
----------
nrows, ncols : int
The number of rows and columns of the grid.
width_ratios : array-like of length *ncols*, optional
Defines the relative widths of the columns. Each column gets a
relative width of ``width_ratios[i] / sum(width_ratios)``.
If not given, all columns will have the same width.
height_ratios : array-like of length *nrows*, optional
Defines the relative heights of the rows. Each row gets a
relative height of ``height_ratios[i] / sum(height_ratios)``.
If not given, all rows will have the same height.
rz/Number of rows must be a positive integer, not z2Number of columns must be a positive integer, not N)<07>
isinstancer<00>
ValueError<EFBFBD>_nrows<77>_ncols<6C>set_height_ratios<6F>set_width_ratios)<05>self<6C>nrows<77>ncols<6C> height_ratios<6F> width_ratioss <20>V/home/antigravity/intellecton/venv/lib/python3.12/site-packages/matplotlib/gridspec.py<70>__init__zGridSpecBase.__init__ s<><00><00><1A>%<25><18>*<2A>e<EFBFBD>q<EFBFBD>j<EFBFBD><1C>A<>%<25><19>K<>M<01> M<01><19>%<25><18>*<2A>e<EFBFBD>q<EFBFBD>j<EFBFBD><1C>D<>U<EFBFBD>I<EFBFBD>N<>P<01> P<01>#(<28>%<25> <20><04> <0B>T<EFBFBD>[<5B> <0C><1E><1E>}<7D>-<2D> <0C><1D><1D>l<EFBFBD>+<2B>c<00>J<00>tt|j<00><00>dk7rd|j<00><02>nd}tt|j<00><00>dk7rd|j<00><02>nd}dj |j
j |j|j||z<00><06>S)N<>z, height_ratios=<3D>z, width_ratios=z&{clsname}({nrows}, {ncols}{optionals}))<04>clsnamerr<00> optionals) <09>len<65>set<65>_row_height_ratios<6F>_col_width_ratios<6F>format<61> __class__<5F>__name__r r)r<00>
height_arg<EFBFBD> width_args r<00>__repr__zGridSpecBase.__repr__9s<><00><00><1C>S<EFBFBD><14>!8<>!8<>9<>:<3A>a<EFBFBD>?<3F>)<29><14>)@<40>)@<40>(C<>D<>EG<45> <13><1C>C<EFBFBD><04> 6<> 6<>7<>8<>A<EFBFBD>=<3D>'<27>t<EFBFBD>'=<3D>'=<3D>&@<40>A<>CE<43> <12>7<>><3E>><3E><18>N<EFBFBD>N<EFBFBD>+<2B>+<2B><16>+<2B>+<2B><16>+<2B>+<2B> <20>9<EFBFBD>,<2C> ?<3F><0E> rc<00><00>|jS<00>N)r <00>rs r<00><lambda>zGridSpecBase.<lambda>E<00>
<00><00>$<24>+<2B>+<2B>rzThe number of rows in the grid.)<01>docc<00><00>|jSr))rr*s rr+zGridSpecBase.<lambda>Gr,rz"The number of columns in the grid.c<00>2<00>|j|jfS)zW
Return a tuple containing the number of rows and columns in the grid.
)r rr*s r<00> get_geometryzGridSpecBase.get_geometryJs<00><00><14>{<7B>{<7B>D<EFBFBD>K<EFBFBD>K<EFBFBD>'<27>'rc<00><00>yr)<00>)r<00>figures r<00>get_subplot_paramszGridSpecBase.get_subplot_paramsPs<00><00> rc<00>2<00>|\}}||||z<00>|||z<00>f}|S)a[
Create and return a `.SubplotSpec` instance.
Parameters
----------
loc : (int, int)
The position of the subplot in the grid as
``(row_index, column_index)``.
rowspan, colspan : int, default: 1
The number of rows and columns the subplot should span in the grid.
r2)r<00>loc<6F>rowspan<61>colspan<61>loc1<63>loc2<63> subplotspecs r<00>new_subplotspeczGridSpecBase.new_subplotspecTs4<00><00><19>
<EFBFBD><04>d<EFBFBD><1A>4<EFBFBD><04>W<EFBFBD> <0C>,<2C>d<EFBFBD>4<EFBFBD><07><<3C>.?<3F>?<3F>@<40> <0B><1A>rc<00><><00>|<01>dg|jz}||_yt|<01>|jk7r td<03><00>||_y)z<>
Set the relative widths of the columns.
*width_ratios* must be of length *ncols*. Each column gets a relative
width of ``width_ratios[i] / sum(width_ratios)``.
NrzTExpected the given number of width ratios to match the number of columns of the grid)rrr r!)rrs rrzGridSpecBase.set_width_ratiosdsT<00><00> <18> <1F><1D>3<EFBFBD><14><1B><1B>,<2C>L<EFBFBD>".<2E><04><1E><11><1C> <1E>$<24>+<2B>+<2B> -<2D><1C>G<01>H<01> H<01>!-<2D><04>rc<00><00>|jS)zo
Return the width ratios.
This is *None* if no width ratios have been set explicitly.
)r!r*s r<00>get_width_ratioszGridSpecBase.get_width_ratiosrs<00><00> <14>%<25>%<25>%rc<00><><00>|<01>dg|jz}||_yt|<01>|jk7r td<03><00>||_y)z<>
Set the relative heights of the rows.
*height_ratios* must be of length *nrows*. Each row gets a relative
height of ``height_ratios[i] / sum(height_ratios)``.
NrzRExpected the given number of height ratios to match the number of rows of the grid)r rr r )rrs rrzGridSpecBase.set_height_ratioszsT<00><00> <19> <20><1E>C<EFBFBD>$<24>+<2B>+<2B>-<2D>M<EFBFBD>#0<><04><1F><11><1D> <1F>4<EFBFBD>;<3B>;<3B> .<2E><1C>D<01>E<01> E<01>"/<2F><04>rc<00><00>|jS)zq
Return the height ratios.
This is *None* if no height ratios have been set explicitly.
)r r*s r<00>get_height_ratioszGridSpecBase.get_height_ratios<6F>s<00><00> <14>&<26>&<26>&rc<00><><00>|j<00>\}}|j|<01>}|j}|j}|j}|j
}|j } |j}
||z
} ||z
} | ||
|dz
zzz } |
| z}| |zt|j<00>z }|jD<00>cgc]}||z<00><02> }}dg|g|dz
zz}tjtj||g<02>j<00>}| || |dz
zzz }| |z}||zt|j<00>z }|jD<00>cgc]}||z<00><02> }}dg|g|dz
zz}tjtj||g<02>j<00>}||z
jd<03>j \}}||zjd<03>j \}}||||fScc}wcc}w)a<>
Return the positions of the grid cells in figure coordinates.
Parameters
----------
fig : `~matplotlib.figure.Figure`
The figure the grid should be applied to. The subplot parameters
(margins and spacing between subplots) are taken from *fig*.
Returns
-------
bottoms, tops, lefts, rights : array
The bottom, top, left, right positions of the grid cells in
figure coordinates.
rr)<02><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)r0r4<00>left<66>right<68>bottom<6F>top<6F>wspace<63>hspace<63>sumr <00>np<6E>cumsum<75> column_stack<63>flatr!<00>reshape<70>T)r<00>figrr<00>subplot_paramsrFrGrHrIrJrK<00> tot_width<74>
tot_height<EFBFBD>cell_h<5F>sep_h<5F>norm<72>r<> cell_heights<74> sep_heights<74>cell_hs<68>cell_w<5F>sep_w<5F> cell_widths<68>
sep_widths<EFBFBD>cell_ws<77>fig_tops<70> fig_bottoms<6D> fig_lefts<74>
fig_rightss r<00>get_grid_positionszGridSpecBase.get_grid_positions<6E>s<><00><00> <1C>(<28>(<28>*<2A> <0C><05>u<EFBFBD><1D>0<>0<><13>5<><0E><1D>"<22>"<22><04><1E>$<24>$<24><05><1F>&<26>&<26><06><1C> <20> <20><03><1F>&<26>&<26><06><1F>&<26>&<26><06><19>D<EFBFBD>L<EFBFBD> <09><18>6<EFBFBD>\<5C>
<EFBFBD><1C>u<EFBFBD>v<EFBFBD>u<EFBFBD>Q<EFBFBD>w<EFBFBD>'7<>7<>8<><06><16><16><0F><05><15><05>~<7E><03>D<EFBFBD>$;<3B>$;<3B> <<3C><<3C><04>*.<2E>*A<>*A<>B<>Q<EFBFBD><01>D<EFBFBD><08>B<> <0C>B<><18>c<EFBFBD>e<EFBFBD>W<EFBFBD><05>a<EFBFBD><07>0<>1<> <0B><14>)<29>)<29>B<EFBFBD>O<EFBFBD>O<EFBFBD>[<5B>,<2C>,G<>H<>M<>M<>N<><07><1B>e<EFBFBD>f<EFBFBD>e<EFBFBD>A<EFBFBD>g<EFBFBD>&6<>6<>7<><06><16><16><0F><05><15><05>~<7E><03>D<EFBFBD>$:<3A>$:<3A> ;<3B>;<3B><04>)-<2D>)?<3F>)?<3F>@<40>A<EFBFBD>q<EFBFBD>4<EFBFBD>x<EFBFBD>@<40> <0B>@<40><17>S<EFBFBD>U<EFBFBD>G<EFBFBD>u<EFBFBD>Q<EFBFBD>w<EFBFBD>/<2F>0<>
<EFBFBD><14>)<29>)<29>B<EFBFBD>O<EFBFBD>O<EFBFBD>Z<EFBFBD><1B>,E<>F<>K<>K<>L<><07>!$<24>w<EFBFBD><1D> 7<> 7<><07> @<40> B<> B<><1D><08>+<2B>!%<25><07><1E> 8<> 8<><17> A<> C<> C<><1D> <09>:<3A><1A>H<EFBFBD>i<EFBFBD><1A>;<3B>;<3B><>C<01><>As <00>3 G<04>> Gc<00><><00>|j<00>D]X}|j<00>}|<04><01>t|d<01>r|j<00>j<00>}|j <00>||fk(s<01>V|cSt |||<00><02>S)zo
Check if the figure already has a gridspec with these dimensions,
or create a new one
<20>get_topmost_subplotspec<65>r3)<06>get_axes<65> get_gridspec<65>hasattrrir0<00>GridSpec)r3rr<00>ax<61>gss r<00>_check_gridspec_existsz#GridSpecBase._check_gridspec_exists<74>sx<00><00> <19>/<2F>/<2F>#<23> <1E>B<EFBFBD><13><1F><1F>"<22>B<EFBFBD><11>~<7E><1A>2<EFBFBD>8<>9<> <1C>3<>3<>5<>B<>B<>D<>B<EFBFBD><15>?<3F>?<3F>$<24><15><05><0E>6<><1D>I<EFBFBD> <1E><18><05>u<EFBFBD>V<EFBFBD>4<>4rc<00>*<00>|j<00>\}}d<01>}t|t<00>r4 |\}}t j
|||d<04>|||d<05>g||f<02>\}} n||||zd<03>\}} t ||| <09>S#t$r}td<02>|<07>d}~wwxYw)z,Create and return a `.SubplotSpec` instance.c<00><00>|}t|t<00>r,|j|<01>\}}}||kDr||dz
fStd<02><00>|dkr||z}d|cxkr|kr||fS|<02>td|<03>d|<02>d|<01><00><06><00>td|<03>d|<01><00><04><00>)Nrz=GridSpec slice would result in no space allocated for subplotrzindex z is out of bounds for axis z with size z) is out of bounds for GridSpec with size )r <00>slice<63>indices<65>
IndexError)<07>key<65>size<7A>axis<69>orig_key<65>start<72>stop<6F>_s r<00>
_normalizez,GridSpecBase.__getitem__.<locals>._normalize<7A>s<><00><00><1A>H<EFBFBD><19>#<23>u<EFBFBD>%<25>!$<24><1B><1B>T<EFBFBD>!2<><0E><05>t<EFBFBD>Q<EFBFBD><17>%<25><<3C> <20>$<24><11>(<28>?<3F>*<2A> <20>"9<>:<3A>:<3A><17><11>7<EFBFBD><1D><04>*<2A>C<EFBFBD><14><03>?<3F>d<EFBFBD>?<3F><1E><03>8<EFBFBD>O<EFBFBD>#<23><19>%<25>$<24>v<EFBFBD>h<EFBFBD>Z<EFBFBD>8-<2D>-1<>F<EFBFBD>+<2B>d<EFBFBD>V<EFBFBD>&E<01>F<01>F<01>%<25>v<EFBFBD>h<EFBFBD>Z<EFBFBD>8;<3B>;?<3F>&<26>&B<01>C<01>CrzUnrecognized subplot specNrr)r0r <00>tupler rM<00>ravel_multi_index<65> SubplotSpec)
rrwrrr~<00>k1<6B>k2<6B>err<72>num1<6D>num2s
r<00> __getitem__zGridSpecBase.__getitem__<5F>s<><00><00><1B>(<28>(<28>*<2A> <0C><05>u<EFBFBD> C<01>( <16>c<EFBFBD>5<EFBFBD> !<21> G<01><1C><06><02>B<EFBFBD><1C>-<2D>-<2D><1B>B<EFBFBD><05>q<EFBFBD>)<29>:<3A>b<EFBFBD>%<25><11>+C<>D<><16><05><0E> <20>J<EFBFBD>D<EFBFBD>$<24>$<24>C<EFBFBD><15><15><1D><04>=<3D>J<EFBFBD>D<EFBFBD>$<24><1A>4<EFBFBD><14>t<EFBFBD>,<2C>,<2C><><1E> G<01> <20>!<<3C>=<3D>3<EFBFBD>F<><46> G<01>s<00>A8<00>8 B<03> B <03> BFT)<04>sharex<65>sharey<65>squeeze<7A>
subplot_kwc<00>6<00>|j}|<05> td<02><00>t|t<00>s|rdnd}t|t<00>s|rdnd}t j
gd<05>||<02><06>|<04>i}|j <00>}tj|j|jft<00><07>}t|j<00>D]]}t|j<00>D]C}d|d||d f|d |fd
<EFBFBD>} | ||d <| ||d <|j|||ffi|<04><01>|||f<<00>E<00>_|d vr#|jD]}
|
jd<0E><0F><00>|dvr#|jD]}
|
j!d<0E><0F><00>|r/|j"dk(r|j%<00>S|j'<00>S|S)z<>
Add all subplots specified by this `GridSpec` to its parent figure.
See `.Figure.subplots` for detailed documentation.
NzIGridSpec.subplots() only works for GridSpecs created with a parent figure<72>all<6C>none)r<><00>row<6F>colr<6C>FT)r<>r<>)<01>dtype)rrr)r<>r<>r<>r<>r<>r<>)r<>r<>T)<01>skip_non_rectangular_axes)r<>r<>r)r3r r <00>strr<00> check_in_list<73>copyrM<00>emptyr r<00>object<63>range<67> add_subplotrP<00>_label_outer_xaxis<69>_label_outer_yaxisrx<00>itemr<6D>) rr<>r<>r<>r<>r3<00>axarrr<72>r<><00> shared_withros r<00>subplotszGridSpecBase.subplots<74>s<><00><00><16><1B><1B><06> <11>><3E><1C><<3C>=<3D> =<3D><1A>&<26>#<23>&<26>$<24>U<EFBFBD>&<26>F<EFBFBD><19>&<26>#<23>&<26>$<24>U<EFBFBD>&<26>F<EFBFBD> <0C><1A><1A>E<>"(<28><16> 9<> <15> <1D><1B>J<EFBFBD><1F>_<EFBFBD>_<EFBFBD>&<26>
<EFBFBD><13><08><08>$<24>+<2B>+<2B>t<EFBFBD>{<7B>{<7B>3<>6<EFBFBD>B<><05><18><14><1B><1B>%<25> 2<>C<EFBFBD><1C>T<EFBFBD>[<5B>[<5B>)<29> 2<><03>'+<2B>E<EFBFBD>$<24>K<EFBFBD>&+<2B>C<EFBFBD><11>F<EFBFBD>m<EFBFBD>E<EFBFBD>!<21>S<EFBFBD>&<26>M<EFBFBD>K<01> <0B>'2<>6<EFBFBD>':<3A>
<EFBFBD>8<EFBFBD>$<24>'2<>6<EFBFBD>':<3A>
<EFBFBD>8<EFBFBD>$<24>"4<>&<26>"4<>"4<><18><13>c<EFBFBD><18>N<EFBFBD>#2<>&0<>#2<><05>c<EFBFBD>3<EFBFBD>h<EFBFBD><0F>  2<> 2<> <12>^<5E> #<23><1B>j<EFBFBD>j<EFBFBD> F<01><02><12>%<25>%<25><04>%<25>E<> F<01> <11>^<5E> #<23><1B>j<EFBFBD>j<EFBFBD> F<01><02><12>%<25>%<25><04>%<25>E<> F<01> <13>$)<29>:<3A>:<3A><11>?<3F>5<EFBFBD>:<3A>:<3A><<3C> G<><05> <0A> <0A><0F> G<><19>Lr)NNr))rr)r$<00>
__module__<EFBFBD> __qualname__<5F>__doc__rr'<00>propertyrrr0r4r<rr?rrBrg<00> staticmethodrqr<>r<>r2rrr r s<><00><00><08>
,<2C>2
<0E> <15>-<2D>:<3A> <<3C>E<EFBFBD> <14>-<2D>=<3D> ?<3F>E<EFBFBD>(<28>  <0A><1B> .<2E>&<26> 0<>'<27>-<<3C>^<12>5<><12>5<>(#-<2D>J"'<27>u<EFBFBD>d<EFBFBD> <20>3rr c<00>T<00><00>eZdZdZ d<08>fd<02> Zgd<03>Zd<04>Zd d<05>Zd<06>Z d
d<07>Z <09>xZ
S) rna
A grid layout to place subplots within a figure.
The location of the grid cells is determined in a similar way to
`.SubplotParams` using *left*, *right*, *top*, *bottom*, *wspace*
and *hspace*.
Indexing a GridSpec instance returns a `.SubplotSpec`.
c <00><><00><01>||_||_||_||_||_| |_||_t<00> |<00>!|||
| <0B><01>y)a<>
Parameters
----------
nrows, ncols : int
The number of rows and columns of the grid.
figure : `.Figure`, optional
Only used for constrained layout to create a proper layoutgrid.
left, right, top, bottom : float, optional
Extent of the subplots as a fraction of figure width or height.
Left cannot be larger than right, and bottom cannot be larger than
top. If not given, the values will be inferred from a figure or
rcParams at draw time. See also `GridSpec.get_subplot_params`.
wspace : float, optional
The amount of width reserved for space between subplots,
expressed as a fraction of the average axis width.
If not given, the values will be inferred from a figure or
rcParams when necessary. See also `GridSpec.get_subplot_params`.
hspace : float, optional
The amount of height reserved for space between subplots,
expressed as a fraction of the average axis height.
If not given, the values will be inferred from a figure or
rcParams when necessary. See also `GridSpec.get_subplot_params`.
width_ratios : array-like of length *ncols*, optional
Defines the relative widths of the columns. Each column gets a
relative width of ``width_ratios[i] / sum(width_ratios)``.
If not given, all columns will have the same width.
height_ratios : array-like of length *nrows*, optional
Defines the relative heights of the rows. Each row gets a
relative height of ``height_ratios[i] / sum(height_ratios)``.
If not given, all rows will have the same height.
<20>rrN) rFrHrGrIrJrKr3<00>superr) rrrr3rFrHrGrIrJrKrrr#s <20>rrzGridSpec.__init__9sS<00><><00>T<19><04> <09><1C><04> <0B><1A><04>
<EFBFBD><16><04><08><1C><04> <0B><1C><04> <0B><1C><04> <0B> <0A><07><18><15><05>&2<>'4<> <19> 6r<00>rFrHrGrIrJrKc <00>0<00>|j<00>D].\}}||jvrt|||<03><00>"t|<02>d<01><02><00>tj
j j<00>D]<5D>}|jjjD]<5D>}|j<00><00><01>|j<00>j<00>}|j<00>|k(s<01>F|jd<03><04>}|j|j<00>j!|<07><00><00><><00><>y)a 
Update the subplot parameters of the grid.
Parameters that are not explicitly given are not changed. Setting a
parameter to *None* resets it to :rc:`figure.subplot.*`.
Parameters
----------
left, right, top, bottom : float or None, optional
Extent of the subplots as a fraction of figure width or height.
wspace, hspace : float, optional
Spacing between the subplots as a fraction of the average subplot
width / height.
z is an unknown keywordNF)<01>root)<11>items<6D> _AllowedKeys<79>setattr<74>AttributeErrorr<00>Gcf<63>figs<67>values<65>canvasr3<00>axes<65>get_subplotspecrirl<00>
get_figure<EFBFBD> _set_position<6F> get_position)r<00>kwargs<67>k<>v<>
figmanagerro<00>ssrSs r<00>updatezGridSpec.updateqs<><00><00><1B>L<EFBFBD>L<EFBFBD>N<EFBFBD> C<01>D<EFBFBD>A<EFBFBD>q<EFBFBD><10>D<EFBFBD>%<25>%<25>%<25><17><04>a<EFBFBD><11>#<23>$<24><01>s<EFBFBD>*@<40>%A<>B<>B<>  C<01>
)<29>,<2C>,<2C>1<>1<>8<>8<>:<3A> Q<01>J<EFBFBD> <20>'<27>'<27>.<2E>.<2E>3<>3<> Q<01><02><15>%<25>%<25>'<27>3<><1B>+<2B>+<2B>-<2D>E<>E<>G<>B<EFBFBD><19><EFBFBD><EFBFBD>(<28>D<EFBFBD>0<> <20>m<EFBFBD>m<EFBFBD><15>m<EFBFBD>7<><03><1A>(<28>(<28><12>);<3B>);<3B>)=<3D>)J<>)J<>3<EFBFBD>)O<>P<>  Q<01> Qrc <00>:<00>|<01>:|jD<00>cic]}|tjd|z<00><02>}}tdi|<03><01>}nt j|j
<00>}|j di|jD<00>cic]}|t||<02><00><02>c}<02><01>|Scc}wcc}w)a:
Return the `.SubplotParams` for the GridSpec.
In order of precedence the values are taken from
- non-*None* attributes of the GridSpec
- the provided *figure*
- :rc:`figure.subplot.*`
Note that the ``figure`` attribute of the GridSpec is always ignored.
<20>figure.subplot.r2)r<><00>mpl<70>rcParams<6D> SubplotParamsr<73><00> subplotparsr<73><00>getattr)rr3r<><00>kwr<77>s rr4zGridSpec.get_subplot_params<6D>s<><00><00> <12>><3E><1F>,<2C>,<2C>.<2E><17><14>S<EFBFBD>\<5C>\<5C>"3<>A<EFBFBD>"5<>6<>6<>.<2E>B<EFBFBD>.<2E>'<27>-<2D>"<22>-<2D>K<EFBFBD><1E>)<29>)<29>F<EFBFBD>$6<>$6<>7<>K<EFBFBD><1A> <0B><1A><1A>N<>4<EFBFBD>;L<>;L<>M<>a<EFBFBD>a<EFBFBD><17><14>q<EFBFBD>!1<>1<>M<>N<><1A><1A><>.<2E><> Ns <00>B<04>8B c<00>Z<00>|jD<00>cgc]}t||<01>s<01>|<01><02>c}Scc}w)z<>
Return a list of the names of the subplot parameters explicitly set
in the GridSpec.
This is a subset of the attributes of `.SubplotParams`.
)r<>r<>)rr<>s r<00>locally_modified_subplot_paramsz(GridSpec.locally_modified_subplot_params<6D>s'<00><00> <20>,<2C>,<2C>A<>a<EFBFBD><07><04>a<EFBFBD>0@<40><01>A<>A<><41>As<00>(<04>(c
<00><><00>|<02>|j<00>}tj||jtj|j|<00><02>|||||<06><03>}|r|j
di|<07><01>yy)a
Adjust subplot parameters to give specified padding.
Parameters
----------
figure : `.Figure`
The figure.
renderer : `.RendererBase` subclass, optional
The renderer to be used.
pad : float
Padding between the figure edge and the edges of subplots, as a
fraction of the font-size.
h_pad, w_pad : float, optional
Padding (height/width) between edges of adjacent subplots.
Defaults to *pad*.
rect : tuple (left, bottom, right, top), default: None
(left, bottom, right, top) rectangle in normalized figure
coordinates that the whole subplots area (including labels) will
fit into. Default (None) is the whole figure.
N)<01> grid_spec)<04>pad<61>h_pad<61>w_pad<61>rectr2)<06> _get_rendererr<00>get_tight_layout_figurer<65><00>get_subplotspec_listr<74>)rr3<00>rendererr<72>r<>r<>r<>r<>s r<00> tight_layoutzGridSpec.tight_layout<75>sl<00><00>, <14> <1B><1D>+<2B>+<2B>-<2D>H<EFBFBD><1E>6<>6<> <12>F<EFBFBD>K<EFBFBD>K<EFBFBD> <19> .<2E> .<2E>v<EFBFBD>{<7B>{<7B>d<EFBFBD> K<> <14>#<23>U<EFBFBD>%<25>d<EFBFBD>D<01><06> <12> <17>D<EFBFBD>K<EFBFBD>K<EFBFBD> !<21>&<26> !<21> r) NNNNNNNNNr))NgH<67>z<14>G<EFBFBD>?NNN) r$r<>r<>r<>rr<>r<>r4r<>r<><00> __classcell__<5F>r#s@rrnrn/sB<00><><00><08>-1<>9=<3D>%)<29>26<32>46<>lJ<01>L<EFBFBD>Q<01>8<1B>.B<01>-1<><@<40>"rrnc<00>6<00><00>eZdZdZ d<05>fd<02> Zdd<03>Zd<04>Z<06>xZS)<07>GridSpecFromSubplotSpeczx
GridSpec whose subplot layout parameters are inherited from the
location specified by a given SubplotSpec.
c<00><><00><01>||_||_t|t<00>r||_n t d<01><00>|jj <00>j|_t<00>|<00>%||||<06><02>y)ak
Parameters
----------
nrows, ncols : int
Number of rows and number of columns of the grid.
subplot_spec : SubplotSpec
Spec from which the layout parameters are inherited.
wspace, hspace : float, optional
See `GridSpec` for more details. If not specified default values
(from the figure or rcParams) are used.
height_ratios : array-like of length *nrows*, optional
See `GridSpecBase` for details.
width_ratios : array-like of length *ncols*, optional
See `GridSpecBase` for details.
zVsubplot_spec must be type SubplotSpec, usually from GridSpec, or axes.get_subplotspec.r<>N)
<EFBFBD>_wspace<63>_hspacer r<><00> _subplot_spec<65> TypeErrorrlr3r<>r) rrr<00> subplot_specrJrKrrr#s <20>rrz GridSpecFromSubplotSpec.__init__<5F>st<00><><00>&<1E><04> <0C><1D><04> <0C> <15>l<EFBFBD>K<EFBFBD> 0<>!-<2D>D<EFBFBD> <1E><1B>N<01>O<01> O<01><1B>(<28>(<28>5<>5<>7<>><3E>><3E><04> <0B> <0A><07><18><15><05>&2<>'4<> <19> 6rc<00><><00>|j<00> |jn*|<01>|jjntjd}|j
<00> |j
n*|<01>|jj ntjd}|jj|<01>}|j\}}}}t||||||<02><03>S)z1Return a dictionary of subplot layout parameters.zfigure.subplot.hspacezfigure.subplot.wspace)rFrGrHrIrJrK) r<>r<>rKr<>r<>r<>rJr<>r<><00>extentsr<73>) rr3rKrJ<00>figboxrFrHrGrIs rr4z*GridSpecFromSubplotSpec.get_subplot_params<6D>s<><00><00>"&<26>,<2C>,<2C>":<3A>$<24>,<2C>,<2C>4:<3A>4F<34>v<EFBFBD>)<29>)<29>0<>0<><1A>|<7C>|<7C>$;<3B><<3C> <0F>#'<27>,<2C>,<2C>":<3A>$<24>,<2C>,<2C>4:<3A>4F<34>v<EFBFBD>)<29>)<29>0<>0<><1A>|<7C>|<7C>$;<3B><<3C> <0F><16>#<23>#<23>0<>0<><16>8<><06>#)<29>><3E>><3E> <20><04>f<EFBFBD>e<EFBFBD>S<EFBFBD><1C>$<24>e<EFBFBD>$*<2A><03>$*<2A>6<EFBFBD>;<3B> ;rc<00>6<00>|jj<00>S)zY
Return the topmost `.SubplotSpec` instance associated with the subplot.
)r<>rir*s rriz/GridSpecFromSubplotSpec.get_topmost_subplotspecs<00><00><14>!<21>!<21>9<>9<>;<3B>;r)NNNNr))r$r<>r<>r<>rr4rir<>r<>s@rr<>r<><00>s <00><><00><08> &*<2A>26<32>6<>@;<3B> <rr<>c<00><><00>eZdZdZdd<03>Zd<04>Zed<05><00>Zed<06><00>Z e jd<07><00>Z d<08>Z d <09>Z ed
<EFBFBD><00>Z ed <0B><00>Zd <0C>Zd <0A>Zd<0E>Zd<0F>Zd<10>Zd<11>Zd<12>Zd<13>Zd<14>Zy)r<>a]
The location of a subplot in a `GridSpec`.
.. note::
Likely, you will never instantiate a `SubplotSpec` yourself. Instead,
you will typically obtain one from a `GridSpec` using item-access.
Parameters
----------
gridspec : `~matplotlib.gridspec.GridSpec`
The GridSpec, which the subplot is referencing.
num1, num2 : int
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 **inclusive**.
The index starts from 0.
Nc<00>.<00>||_||_||_yr))<03> _gridspecr<63>r<>)r<00>gridspecr<63>r<>s rrzSubplotSpec.__init__s<00><00>!<21><04><0E><18><04> <09><18><04> rc
<00><><00>|j<00><00>d|jj<00>d|jj<00>d|jj<00>d|jj<00>d<04>
S)N<>[<5B>:z, <20>])rlr7r{r|r8r*s rr'zSubplotSpec.__repr__"sc<00><00><17>$<24>$<24>&<26>'<27>q<EFBFBD><17><<3C><<3C>%<25>%<25>&<26>a<EFBFBD><04> <0C> <0C>(9<>(9<>':<3A>"<22><17><<3C><<3C>%<25>%<25>&<26>a<EFBFBD><04> <0C> <0C>(9<>(9<>':<3A>!<21>=<3D> >rc<00><><00>t|<01>dk(rS|\}t|t<00>r|St|t<00>st d|<02><02><02><00> t t t|<02><00>\}}}n6t|<01>dk(r|\}}}n!tjddt|<01><00><07><00>tj|||<04>}|<06>t|||<00><08>}t|t<00>r4t|<05>d k(r&td
<EFBFBD>|D<00><00>st d |<05><00><02><00>|\}}n5t|t<00>r |dks|||zkDrt d ||z<00>d |<05><02><04><00>|x}}||dz
|S#t$rt d|<02><02><02>d<03>wxYw)z<>
Construct a `.SubplotSpec` from a parent `.Figure` and either
- a `.SubplotSpec` -- returned as is;
- one or three numbers -- a MATLAB-style subplot specifier.
rz>Single argument to subplot must be a three-digit integer, not N<><00>subplotz1 or 3)<02>takes<65>givenrjrEc3<00><K<00>|]}t|t<00><00><01><00>y<00>wr))r r)<02>.0<EFBFBD>ns r<00> <genexpr>z1SubplotSpec._from_subplot_args.<locals>.<genexpr>Fs<00><00><><00><<3C>1<EFBFBD>z<EFBFBD>!<21>X<EFBFBD>.<2E><<3C>s<00>z3Subplot specifier tuple must contain integers, not z(num must be an integer with 1 <= num <= z, not )rr r<>rr <00>map<61>intr<74>r<00> nargs_errorrnrqrr<>) r3<00>args<67>arg<72>rows<77>cols<6C>numrp<00>i<>js r<00>_from_subplot_argszSubplotSpec._from_subplot_args's<><00><00> <0F>t<EFBFBD>9<EFBFBD><01>><3E><17>D<EFBFBD>C<EFBFBD><19>#<23>{<7B>+<2B><1A>
<EFBFBD><1F><03>X<EFBFBD>.<2E> <20>$<24>$'<27>7<EFBFBD>,<2C>-<2D>-<2D> 7<>"%<25>c<EFBFBD>3<EFBFBD>s<EFBFBD>8<EFBFBD>"4<><0F><04>d<EFBFBD>C<EFBFBD>
<11><14>Y<EFBFBD>!<21>^<5E>"<22>O<EFBFBD>D<EFBFBD>$<24><03><16>"<22>"<22>9<EFBFBD>H<EFBFBD>C<EFBFBD><04>I<EFBFBD>N<> N<> <15> ,<2C> ,<2C>V<EFBFBD>T<EFBFBD>4<EFBFBD> @<40><02> <0A>:<3A><19>$<24><04>V<EFBFBD>4<>B<EFBFBD> <15>c<EFBFBD>5<EFBFBD> !<21>c<EFBFBD>#<23>h<EFBFBD>!<21>m<EFBFBD><16><<3C><03><<3C><<3C> <20>I<>#<23><15>O<><12><12><17>D<EFBFBD>A<EFBFBD>q<EFBFBD><1D>c<EFBFBD>8<EFBFBD>,<2C><03>a<EFBFBD><07>3<EFBFBD><14>d<EFBFBD><19>?<3F> <20>><3E>t<EFBFBD>D<EFBFBD>y<EFBFBD>k<EFBFBD>J<1B><1E>'<27>#<23><12><12><18>K<EFBFBD>A<EFBFBD><01><11>!<21>A<EFBFBD>#<23>a<EFBFBD>y<EFBFBD><18><>3<1E> 7<> <20>$<24>$'<27>7<EFBFBD>,<2C>-<2D>26<32>7<> 7<>s <00>E<00>Ec<00>J<00>|j<00> |jS|jSr))<02>_num2r<32>r*s rr<>zSubplotSpec.num2Ws<00><00> <20>J<EFBFBD>J<EFBFBD>.<2E>t<EFBFBD>y<EFBFBD>y<EFBFBD>><3E>D<EFBFBD>J<EFBFBD>J<EFBFBD>>rc<00><00>||_yr))r<>)r<00>values rr<>zSubplotSpec.num2[s <00><00><1A><04>
rc<00><00>|jSr))r<>r*s rrlzSubplotSpec.get_gridspec_s <00><00><13>~<7E>~<7E>rc<00>x<00>|j<00>j<00>\}}|||j|jfS)a
Return the subplot geometry as tuple ``(n_rows, n_cols, start, stop)``.
The indices *start* and *stop* define the range of the subplot within
the `GridSpec`. *stop* is inclusive (i.e. for a single cell
``start == stop``).
)rlr0r<>r<>)rr<>r<>s rr0zSubplotSpec.get_geometrybs6<00><00><1A>&<26>&<26>(<28>5<>5<>7<>
<EFBFBD><04>d<EFBFBD><13>T<EFBFBD>4<EFBFBD>9<EFBFBD>9<EFBFBD>d<EFBFBD>i<EFBFBD>i<EFBFBD>/<2F>/rc<00><><00>|j<00>j}t|j|z|j|zdz<00>S)z6The rows spanned by this subplot, as a `range` object.r)rlrr<>r<>r<>)rrs rr7zSubplotSpec.rowspanms<<00><00><15>!<21>!<21>#<23>)<29>)<29><05><14>T<EFBFBD>Y<EFBFBD>Y<EFBFBD>%<25>'<27><14><19><19>e<EFBFBD>);<3B>a<EFBFBD>)?<3F>@<40>@rc<00><><00>|j<00>j}t|j|z|j|zg<02>\}}t ||dz<00>S)z9The columns spanned by this subplot, as a `range` object.r)rlr<00>sortedr<64>r<>r<>)rr<00>c1<63>c2s rr8zSubplotSpec.colspanssP<00><00><15>!<21>!<21>#<23>)<29>)<29><05><18><14><19><19>U<EFBFBD>*<2A>D<EFBFBD>I<EFBFBD>I<EFBFBD><05>,=<3D>><3E>?<3F><06><02>B<EFBFBD><14>R<EFBFBD><12>a<EFBFBD><16> <20> rc<00>4<00>|jjdk(S<00>Nr)r7r{r*s r<00> is_first_rowzSubplotSpec.is_first_row|<00><00><00><13>|<7C>|<7C>!<21>!<21>Q<EFBFBD>&<26>&rc<00>d<00>|jj|j<00>jk(Sr))r7r|rlrr*s r<00> is_last_rowzSubplotSpec.is_last_row<00>&<00><00><13>|<7C>|<7C> <20> <20>D<EFBFBD>$5<>$5<>$7<>$=<3D>$=<3D>=<3D>=rc<00>4<00>|jjdk(Sr
)r8r{r*s r<00> is_first_colzSubplotSpec.is_first_col<6F>r rc<00>d<00>|jj|j<00>jk(Sr))r8r|rlrr*s r<00> is_last_colzSubplotSpec.is_last_col<6F>rrc<00><><00>|j<00>}|j<00>\}}tj|j|j
g||f<02>\}}|j |<01>\}}} }
||j<00>} ||j<00>} | |j<00>} |
|j<00>}tj| | || <0C>S)zJ
Update the subplot position from ``figure.subplotpars``.
) rlr0rM<00> unravel_indexr<78>r<>rg<00>min<69>maxr<00> from_extents)rr3r<>rrr<>r<>rdrcrerf<00>
fig_bottom<EFBFBD>fig_top<6F>fig_left<66> fig_rights rr<>zSubplotSpec.get_position<6F>s<><00><00><18>$<24>$<24>&<26><08><1F>,<2C>,<2C>.<2E> <0C><05>u<EFBFBD><17>%<25>%<25>t<EFBFBD>y<EFBFBD>y<EFBFBD>$<24>)<29>)<29>&<<3C>u<EFBFBD>e<EFBFBD>n<EFBFBD>M<>
<EFBFBD><04>d<EFBFBD> <14> '<27> '<27><06> /<2F> 5<> <0B>X<EFBFBD>y<EFBFBD>*<2A>!<21><14>&<26>*<2A>*<2A>,<2C>
<EFBFBD><1A>4<EFBFBD>.<2E>$<24>$<24>&<26><07><1C>T<EFBFBD>?<3F>&<26>&<26>(<28><08><1E>t<EFBFBD>$<24>(<28>(<28>*<2A> <09><13> <20> <20><18>:<3A>y<EFBFBD>'<27>J<>Jrc<00>^<00>|j<00>}t|d<01>r|j<00>S|S)zX
Return the topmost `SubplotSpec` instance associated with the subplot.
ri)rlrmri)rr<>s rriz#SubplotSpec.get_topmost_subplotspec<65>s1<00><00><18>$<24>$<24>&<26><08> <12>8<EFBFBD>6<> 7<><1B>3<>3<>5<> 5<><17>Krc <00><><00>|j|j|jft|dt <00><00>t|dt <00><00>t|dt <00><00>fk(S)z}
Two SubplotSpecs are considered equal if they refer to the same
position(s) in the same `GridSpec`.
r<>r<>r<>)r<>r<>r<>r<>r<>)r<00>others r<00>__eq__zSubplotSpec.__eq__<5F>sS<00><00> <16><1E><1E><14><19><19>D<EFBFBD>I<EFBFBD>I<EFBFBD>6<><1B>E<EFBFBD>;<3B><06><08>9<><1B>E<EFBFBD>6<EFBFBD>6<EFBFBD>8<EFBFBD>4<><1B>E<EFBFBD>6<EFBFBD>6<EFBFBD>8<EFBFBD>4<>6<>6<> 7rc<00>Z<00>t|j|j|jf<03>Sr))<04>hashr<68>r<>r<>r*s r<00>__hash__zSubplotSpec.__hash__<5F>s <00><00><13>T<EFBFBD>^<5E>^<5E>T<EFBFBD>Y<EFBFBD>Y<EFBFBD><04> <09> <09>:<3A>;<3B>;rc <00><00>t|||fi|<03><01>S)a<>
Create a GridSpec within this subplot.
The created `.GridSpecFromSubplotSpec` will have this `SubplotSpec` as
a parent.
Parameters
----------
nrows : int
Number of rows in grid.
ncols : int
Number of columns in grid.
Returns
-------
`.GridSpecFromSubplotSpec`
Other Parameters
----------------
**kwargs
All other parameters are passed to `.GridSpecFromSubplotSpec`.
See Also
--------
matplotlib.pyplot.subplots
Examples
--------
Adding three subplots in the space occupied by a single subplot::
fig = plt.figure()
gs0 = fig.add_gridspec(3, 1)
ax1 = fig.add_subplot(gs0[0])
ax2 = fig.add_subplot(gs0[1])
gssub = gs0[2].subgridspec(1, 3)
for i in range(3):
fig.add_subplot(gssub[0, i])
)r<>)rrrr<>s r<00> subgridspeczSubplotSpec.subgridspec<65>s<00><00>P'<27>u<EFBFBD>e<EFBFBD>T<EFBFBD>D<>V<EFBFBD>D<>Drr))r$r<>r<>r<>rr'r<>r<>r<>r<><00>setterrlr0r7r8r rrrr<>rir r#r%r2rrr<>r<> s<><00><00><08>&<19>
><3E>
<12>*<19><12>*<19>^<0E>?<3F><0E>?<3F>
<EFBFBD>[<5B>[<5B><1B><11><1B><1E> 0<><0E>A<01><0E>A<01>
<0E>!<21><0E>!<21>'<27>><3E>'<27>><3E>K<01> <18> 7<><<3C>(Err<>c<00>(<00>eZdZdZ dd<03>Z dd<04>Zy)r<>zM
Parameters defining the positioning of a subplots grid in a figure.
Nc<00><><00>dD]#}t||tjd|<07><00><00><00>%|j||||||<06>y)au
Defaults are given by :rc:`figure.subplot.[name]`.
Parameters
----------
left : float
The position of the left edge of the subplots,
as a fraction of the figure width.
right : float
The position of the right edge of the subplots,
as a fraction of the figure width.
bottom : float
The position of the bottom edge of the subplots,
as a fraction of the figure height.
top : float
The position of the top edge of the subplots,
as a fraction of the figure height.
wspace : float
The width of the padding between subplots,
as a fraction of the average Axes width.
hspace : float
The height of the padding between subplots,
as a fraction of the average Axes height.
r<>r<>N)r<>r<>r<>r<>)rrFrHrGrIrJrKrws rrzSubplotParams.__init__<5F>sH<00><00>4J<01> F<01>C<EFBFBD> <13>D<EFBFBD>#<23>s<EFBFBD>|<7C>|<7C>o<EFBFBD>c<EFBFBD>U<EFBFBD>,C<>D<> E<> F<01> <0C> <0B> <0B>D<EFBFBD>&<26>%<25><13>f<EFBFBD>f<EFBFBD>=rc<00>"<00>|<01>|n |j|<03>|n |jk\r td<02><00>|<02>|n |j|<04>|n |jk\r td<03><00>|<01>||_|<03>||_|<02>||_|<04>||_|<05>||_|<06>||_yy)zY
Update the dimensions of the passed parameters. *None* means unchanged.
Nzleft cannot be >= rightzbottom cannot be >= top)rFrGr rHrIrJrK)rrFrHrGrIrJrKs rr<>zSubplotParams.update<74>s<><00><00>
<1A>%<25>T<EFBFBD>4<EFBFBD>9<EFBFBD>9<EFBFBD>"<22>.<2E>E<EFBFBD>D<EFBFBD>J<EFBFBD>J<EFBFBD> @<01><1C>6<>7<> 7<><1D>)<29>V<EFBFBD>t<EFBFBD>{<7B>{<7B><1E>?<3F>C<EFBFBD><04><08><08> :<3A><1C>6<>7<> 7<> <0F> <1B><1C>D<EFBFBD>I<EFBFBD> <10> <1C><1E>D<EFBFBD>J<EFBFBD> <11> <1D> <20>D<EFBFBD>K<EFBFBD> <0E>?<3F><1A>D<EFBFBD>H<EFBFBD> <11> <1D> <20>D<EFBFBD>K<EFBFBD> <11> <1D> <20>D<EFBFBD>K<EFBFBD> r)NNNNNN)r$r<>r<>r<>rr<>r2rrr<>r<><00>s$<00><00><08>@D<01>%)<29>><3E><>B<01>#'<27>!rr<>)r<>r<><00>logging<6E>numbersr<00>numpyrM<00>
matplotlibr<EFBFBD>rrr<00>matplotlib.transformsr<00> getLoggerr$<00>_logr rnr<>r<>r<>r2rr<00><module>r1sx<00><01>
<04> <0C><0E><1C><12><18>:<3A>:<3A>&<26><18>w<EFBFBD><18><18><18>"<22><04>R<19>R<19>j["<22>|<7C>["<22>|9<<3C>l<EFBFBD>9<<3C>xOE<01>OE<01>d9!<21>9!r