+
     ]iHW  c                   s    ^ RI Ht ^ RIt^ RIHt ^ RIt^ RIHtH	t	 ^ RI
Ht ^RIHtHtHt ^RIHtHt  ! R R	4      t]	P(                  ! ]R
4      t ! R R4      t ! R R]4      t]tR# )    )NumberN)
MethodType)_apicbook)SubplotSpec)SizeSubplotDividerDivider)AxesSimpleAxisArtistc                   s8   a a ] tR t^t oV 3R ltR tRtVtV ;t# )CbarAxesBasec               s4   < Wn         \        SV `  ! V/ VB  R # N)orientationsuper__init__)selfr   Zargskwargs	__class__s   &$*,H/usr/lib64/python3.14/site-packages/mpl_toolkits/axes_grid1/axes_grid.pyr   ZCbarAxesBase.__init__   s    &$)&)    c                sd    V P                  R R7      P                  ! V3RV RV P                  /VB # )FZrootcaxZlocation)
get_figurecolorbarr   )r   Zmappabler   s   &&,r   r   ZCbarAxesBase.colorbar   sF    E*33EE)-)9)9E=CE 	Er   r   )	__name__
__module____qualname____firstlineno__r   r   __static_attributes____classdictcell____classcell__r   __classdict__   @@r   r   r      s     *E Er   r   zCbar{}c                   s   a  ] tR t^t o Rt]tRRRRRRRRR	R
RRR/R lltR tR t	R t
R tR tR tR tR tR tR tR tR tR tRtV tR# )Grida  
A grid of Axes.

In Matplotlib, the Axes location (and size) is specified in normalized
figure coordinates. This may not be ideal for images that needs to be
displayed with a given aspect ratio; for example, it is difficult to
display multiple images of a same size with some fixed padding between
them.  AxesGrid can be used in such case.

Attributes
----------
axes_all : list of Axes
    A flat list of Axes. Note that you can also access this directly
    from the grid. The following is equivalent ::

        grid[i] == grid.axes_all[i]
        len(grid) == len(grid.axes_all)

axes_column : list of list of Axes
    A 2D list of Axes where the first index is the column. This results
    in the usage pattern ``grid.axes_column[col][row]``.
axes_row : list of list of Axes
    A 2D list of Axes where the first index is the row. This results
    in the usage pattern ``grid.axes_row[row][col]``.
axes_llc : Axes
    The Axes in the lower left corner.
ngrids : int
    Number of Axes in the grid.
N	share_allFshare_xTshare_y
label_modeL
axes_classaspectc               s|   Vw  V n         V n        Vf   V P                   V P                  ,          pM7^ Tu;8  d#   V P                   V P                  ,          8:  g   M \        R4      hW@n        \	        \
        P                  \        P                  ! V^4      4      w  V n	        V n
        \        P                  ! RR.VR7       WPn        Vf   V P                  pM7\        V\         \"        34      '       d   Vw  r\$        P&                  ! V3/ VB p\)        . . VR7      p\        V\*        \,        34      '       d   \/        W3/ VB V n        MR\3        V4      ^8X  d   \/        V.VO5/ VB V n        M-\3        V4      ^8X  d   \5        W3/ VB V n        M\7        R4      hV P0                  P9                  4       p\        P:                  ! V P                   V P                  3R\<        R7      p\?        V P                  4       Fe  pV PA                  V4      w  ppV'       d   VR,          ;ppM*V'       d   V^ V3,          MRpV	'       d   VV^ 3,          MRpV! WVVR	7      VVV3&   Kg  	  TPC                  V P                  R8X  d   R
MRR7      PE                  4       V n#        VPH                  PE                  4       V n%        VPE                  4       V n&        V PJ                  ^ ,          R,          V n'        V PQ                  4        V PF                   F  pVPS                  V4       K  	  V PU                  V
4       R# )a  
Parameters
----------
fig : `.Figure`
    The parent figure.
rect : (float, float, float, float), (int, int, int), int, or     `~.SubplotSpec`
    The axes position, as a ``(left, bottom, width, height)`` tuple,
    as a three-digit subplot position code (e.g., ``(1, 2, 1)`` or
    ``121``), or as a `~.SubplotSpec`.
nrows_ncols : (int, int)
    Number of rows and columns in the grid.
ngrids : int or None, default: None
    If not None, only the first *ngrids* axes in the grid are created.
direction : {"row", "column"}, default: "row"
    Whether axes are created in row-major ("row by row") or
    column-major order ("column by column").  This also affects the
    order in which axes are accessed using indexing (``grid[index]``).
axes_pad : float or (float, float), default: 0.02
    Padding or (horizontal padding, vertical padding) between axes, in
    inches.
share_all : bool, default: False
    Whether all axes share their x- and y-axis.  Overrides *share_x*
    and *share_y*.
share_x : bool, default: True
    Whether all axes of a column share their x-axis.
share_y : bool, default: True
    Whether all axes of a row share their y-axis.
label_mode : {"L", "1", "all", "keep"}, default: "L"
    Determines which axes will get tick labels:

    - "L": All axes on the left column get vertical tick labels;
      all axes on the bottom row get horizontal tick labels.
    - "1": Only the bottom left axes is labelled.
    - "all": All axes are labelled.
    - "keep": Do not do anything.

axes_class : subclass of `matplotlib.axes.Axes`, default: `.mpl_axes.Axes`
    The type of Axes to create.
aspect : bool, default: False
    Whether the axes aspect ratio follows the aspect ratio of the data
    limits.
Nz7ngrids must be positive and not larger than nrows*ncolscolumnrow)	direction)Z
horizontalZverticalr+   zIncorrect rect format)Zdtype)sharexshareyZCZF)Zorder)r    r    )+_nrows_ncolsZ
ValueErrorngridsZmapr   ZFixednpZbroadcast_to_horiz_pad_size_vert_pad_sizer   check_in_list
_direction_defaultAxesClass
isinstanceZlistZtuple	functoolsZpartialZdictr   r   r   _dividerlenr   Z	TypeErrorget_positionfullZobjectrange_get_col_rowZravelZtolistaxes_allZTaxes_columnaxes_rowaxes_llc_init_locatorsadd_axesset_label_mode)r   figrectnrows_ncolsr4   r.   axes_padr%   r&   r'   r(   r*   r+   Zclsr   ZkwZ
axes_arrayicolr-   r/   r0   axs   &&&&&&&$$$$$$          r   r   ZGrid.__init__<   s   r $/ T[>[[4;;.Fv:t{{!:: MO O 47JJ!4561d1 	He,	B#//J
T5M22$KC"**39&9JR"V<dV[122*3;;DMY!^*3<<<DMY!^#C44DM344}}))+WWdkk4;;7VL
t{{#A((+HC",T"22/6AsF+D/6CF+D#-&$9JsCx  $ #((E1#s ) <<BFH 	%<<..0"))+((+B/--BLL   	J'r   c           	     s   V P                   P                  \        P                  ! ^4      V P                  .V P
                  ^,
          ,          \        P                  ! ^4      .,           4       V P                   P                  \        P                  ! ^4      V P                  .V P                  ^,
          ,          \        P                  ! ^4      .,           4       \        V P                  4       Fy  pV P                  V4      w  r#V P                  V,          P                  V P                   P                  ^V,          ^V P                  ^,
          V,
          ,          R7      4       K{  	  R# )i   nxnyN)r=   set_horizontalr   ZScaledr6   r3   set_verticalr7   r2   rA   r4   rB   rC   set_axes_locatornew_locator)r   rN   rO   r-   s   &   r   rG   ZGrid._init_locators   s    $$[[^T112dkk!mDTUGWW	Y""[[^T001T[[]Ct{{ST~FVV	Xt{{#A((+HCMM!--))QWdkkAoPS>S9T)UW $r   c                s    V P                   R 8X  d   \        WP                  4      w  r#W#3# \        WP                  4      w  r2W#3# )r,   )r9   Zdivmodr2   r3   )r   ZnrO   r-   s   &&  r   rB   ZGrid._get_col_row   s@    ??h&a-HC x a-HCxr   c                s,    \        V P                  4      # r   )r>   rC   r      &r   __len__ZGrid.__len__   s    4==!!r   c                s(    V P                   V,          # r   )rC   )r   rN      &&r   __getitem__ZGrid.__getitem__   s    }}Qr   c                s2    V P                   V P                  3# )zF
Return the number of rows and columns of the grid as (nrows, ncols).
)r2   r3   rX   rY   r   get_geometryZGrid.get_geometry   s     {{DKK''r   c                sf    V^ ,          V P                   n        V^,          V P                  n        R# )z
Set the padding between the axes.

Parameters
----------
axes_pad : (float, float)
    The padding (horizontal pad, vertical pad) in inches.
Nr6   
fixed_sizer7   )r   rM   r[   r   set_axes_padZGrid.set_axes_pad   s(     +31+')1!&r   c                sZ    V P                   P                  V P                  P                  3# )zl
Return the axes padding.

Returns
-------
hpad, vpad
    Padding (horizontal pad, vertical pad) in inches.
r^   rX   rY   r   get_axes_padZGrid.get_axes_pad   s,     $$//##..0 	0r   c                s<    V P                   P                  V4       R# )z%Set the aspect of the SubplotDivider.N)r=   
set_aspect)r   r+   r[   r   rb   ZGrid.set_aspect   s      (r   c                6    V P                   P                  4       # )z(Return the aspect of the SubplotDivider.)r=   
get_aspectrX   rY   r   rd   ZGrid.get_aspect   s    }}''))r   c                s   \         P                  ! . R
OVR7       \        P                  RV P                  1RV P
                  13,          V P                  ^,
          ..^ ...8H  w  r#VR8X  d0   \        P                  ! V P                  V P
                  3R4      ;rEMVR8X  d   TpTpMVR8X  d   W#,          ;rEMR# \        V P                  4       EF  p\        V P
                  4       F  pV P                  V,          V,          p\        VP                  \        4      '       dR   \        VP                  ^VP                  R,          4      p	\        VP                  ^VP                  R,          4      p
M&VP                  R,          p	VP                  R,          p
V	P!                  WFV3,          WFV3,          R	7       V
P!                  WVV3,          WVV3,          R	7       K  	  EK  	  R# )ah  
Define which axes have tick labels.

Parameters
----------
mode : {"L", "1", "all", "keep"}
    The label mode:

    - "L": All axes on the left column get vertical tick labels;
      all axes on the bottom row get horizontal tick labels.
    - "1": Only the bottom left axes is labelled.
    - "all": All axes are labelled.
    - "keep": Do not do anything.
allr)   1)modeNTbottomleft)Z
ticklabelsZlabel)re   r)   rf   Zkeep)r   r8   r5   Zmgridr2   r3   r@   rA   rE   r;   Zaxisr   r
   ZxaxisZspinesZyaxisZtoggle)r   rg   Zis_last_rowZis_first_colrh   ri   rN   jrP   Zbottom_axisZ	left_axiss   &&         r   rI   ZGrid.set_label_mode   s    	44@HH\dkk\<DKK</0t{{Q6G5HA3%4PP 	"5=GGT[[$++$>EEFTS[ FDS['66FTt{{#A4;;']]1%a(bggz22"2288Q		(@S"TK 01bii>O PI"$''("3K "I""fTl&A,"O  DAJda4j I ( $r   c                s    V P                   # r   )r=   rX   rY   r   get_dividerZGrid.get_divider  s    }}r   c                s<    V P                   P                  V4       R # r   )r=   Zset_locator)r   locatorr[   r   rV   ZGrid.set_axes_locator  s    !!'*r   c                rc   r   )r=   Zget_locatorrX   rY   r   get_axes_locatorZGrid.get_axes_locator  s    }}((**r   )r9   r=   r6   r3   r2   r7   rC   rD   rF   rE   r4   Nr-   g{Gz?)r   r   r   r   __doc__r	   r:   r   rG   rB   rZ   r\   r]   r`   ra   rb   rd   rI   rk   rV   rm   r   r   )r"   s   @r   r$   r$      s     < q( !q( q( q(  q( !q( q(fW" (
5
0)*%JN++ +r   r$   c                   sh   a a ] tR tRt oRtRRRRRRR	R
RRRRRRRRRRR/	V 3R llltR tRtVtV ;t	# )	ImageGridi  a:  
A grid of Axes for Image display.

This class is a specialization of `~.axes_grid1.axes_grid.Grid` for displaying a
grid of images.  In particular, it forces all axes in a column to share their x-axis
and all axes in a row to share their y-axis.  It further provides helpers to add
colorbars to some or all axes.
Nr%   Fr+   Tr(   r)   	cbar_modecbar_locationrightcbar_pad	cbar_sizez5%cbar_set_caxr*   c       	        s  < \         P                  ! . ROV
R7       \         P                  ! . R	OVR7       Wn        Wn        Wn        Wn        \        SV `  WW4WVVRRVWR7       V P                   F  pVP                  V4       K  	  V'       d   V P                  R8X  d.   V P                   F  pV P                  ^ ,          Vn        K  	  R# V P                  R8X  dy   \        V P                  4       F]  w  ppV P                  V4      w  ppV P                  R
9   d   V P                  V,          Vn        KE  V P                  V,          Vn        K_  	  R# \        V P                  V P                  4       F  w  ppVVn        K  	  R# R# )a"	  
Parameters
----------
fig : `.Figure`
    The parent figure.
rect : (float, float, float, float) or int
    The axes position, as a ``(left, bottom, width, height)`` tuple or
    as a three-digit subplot position code (e.g., "121").
nrows_ncols : (int, int)
    Number of rows and columns in the grid.
ngrids : int or None, default: None
    If not None, only the first *ngrids* axes in the grid are created.
direction : {"row", "column"}, default: "row"
    Whether axes are created in row-major ("row by row") or
    column-major order ("column by column").  This also affects the
    order in which axes are accessed using indexing (``grid[index]``).
axes_pad : float or (float, float), default: 0.02in
    Padding or (horizontal padding, vertical padding) between axes, in
    inches.
share_all : bool, default: False
    Whether all axes share their x- and y-axis.  Note that in any case,
    all axes in a column share their x-axis and all axes in a row share
    their y-axis.
aspect : bool, default: True
    Whether the axes aspect ratio follows the aspect ratio of the data
    limits.
label_mode : {"L", "1", "all"}, default: "L"
    Determines which axes will get tick labels:

    - "L": All axes on the left column get vertical tick labels;
      all axes on the bottom row get horizontal tick labels.
    - "1": Only the bottom left axes is labelled.
    - "all": all axes are labelled.

cbar_mode : {"each", "single", "edge", None}, default: None
    Whether to create a colorbar for "each" axes, a "single" colorbar
    for the entire grid, colorbars only for axes on the "edge"
    determined by *cbar_location*, or no colorbars.  The colorbars are
    stored in the :attr:`cbar_axes` attribute.
cbar_location : {"left", "right", "bottom", "top"}, default: "right"
cbar_pad : float, default: None
    Padding between the image axes and the colorbar axes.

    .. versionchanged:: 3.10
        ``cbar_mode="single"`` no longer adds *axes_pad* between the axes
        and the colorbar if the *cbar_location* is "left" or "bottom".

cbar_size : size specification (see `.Size.from_any`), default: "5%"
    Colorbar size.
cbar_set_cax : bool, default: True
    If True, each axes in the grid has a *cax* attribute that is bound
    to associated *cbar_axes*.
axes_class : subclass of `matplotlib.axes.Axes`, default: None
singleedgeN)rq   )rr   T)r.   rM   r%   r&   r'   r+   r(   r*   )eachrw   rx   N)ri   rs   rh   topri   rs   )r   r8   _colorbar_mode_colorbar_location_colorbar_pad_colorbar_sizer   r   	cbar_axesrH   rC   r   	enumeraterB   Zzip)r   rJ   rK   rL   r4   r.   rM   r%   r+   r(   rq   rr   rt   ru   rv   r*   rP   ZindexrO   r-   r   r   s   &&&&&&&$$$$$$$$$     r   r   ZImageGrid.__init__)  sO   N 	;%.	0=)6	8'"/%' 	{tF!	 	 	: ..BLL ! ""h.--B!^^A.BF ($$.!*4==!9IE2#007HC..2CC!%!4!%!4 ":  #4==$..AGB BF  B r   c           	     s   V P                   fI   V P                  R9   d   V P                  P                  V n         MV P                  P                  V n         \        V P                  4       Uu. uFd  p\        V P                  4      ! V P                  ^ ,          P                  RR7      V P                  P                  4       V P                  R7      NKf  	  upV n        V P                  pV P                  p. p. p. p. pVR8X  Ed   VR9   Ed   VR8X  d   V P                  \         P"                  ! V P$                  4      ,          pVP'                  \         P(                  ! V P*                  V4      4       VP'                  \         P(                  ! V P                   V4      4       V P                  P-                  ^ ^ RR7      p	MVR8X  d   V P.                  \         P0                  ! V P$                  4      ,          pVP'                  \         P(                  ! V P*                  V4      4       VP'                  \         P(                  ! V P                   V4      4       V P                  P-                  ^ R^ R	7      p	\        V P                  4       F%  p
V P                  V
,          P3                  R4       K'  	  V P                  ^ ,          P5                  X	4       V P                  ^ ,          P3                  R
4       \7        V P8                  ^ ,          4       EF  w  rV^ 8w  d   VP'                  V P                  4       V'       d,   \         P"                  ! VRV P                  ^ ,          R7      pM;\         P"                  ! V P                  ^ ,          RV P                  ^ ,          R7      pVR8X  d   VR8X  g   VR8X  d   V^ 8X  d{   VP'                  \;        V4      4       VP'                  \         P(                  ! V P*                  V4      4       VP'                  \         P(                  ! V P                   V4      4       VP'                  \;        V4      4       VP'                  V4       VR8X  g   EKa  VR8X  g%   VR8X  g   EKr  WP.                  ^,
          8X  g   EK  VP'                  \         P(                  ! V P                   V4      4       VP'                  \;        V4      4       VP'                  \         P(                  ! V P*                  V4      4       EK	  	  . p. p\7        V P<                  ^ ,          R R R1,          4       EF  w  rV^ 8w  d   VP'                  V P                  4       V'       d,   \         P0                  ! VRV P                  ^ ,          R7      pM;\         P0                  ! V P                  ^ ,          RV P                  ^ ,          R7      pVR8X  d   VR8X  g   VR8X  d   V^ 8X  d{   VP'                  \;        V4      4       VP'                  \         P(                  ! V P*                  V4      4       VP'                  \         P(                  ! V P                   V4      4       VP'                  \;        V4      4       VP'                  V4       VR8X  g   EKa  VR8X  g%   VR8X  g   EKr  WP                  ^,
          8X  g   EK  VP'                  \         P(                  ! V P                   V4      4       VP'                  \;        V4      4       VP'                  \         P(                  ! V P*                  V4      4       EK	  	  \        V P                  4       EFR  p
V P?                  V
4      w  rV P                  P-                  Wk,          WP                  ^,
          V,
          ,          R7      p	V P                  V
,          P5                  V	4       VR8X  d   VR9   dC   V P                  P-                  W{,          WP                  ^,
          V,
          ,          R7      p	MHVR9   dB   V P                  P-                  Wk,          WP                  ^,
          V,
          ,          R7      p	V P                  V
,          P5                  V	4       EK7  VR8X  g   EKA  VR8X  d   V^ 8X  g   VR8X  d   WP.                  ^,
          8X  dh   V P                  P-                  V^ ,          WP                  ^,
          V,
          ,          R7      p	V P                  V,          P5                  V	4       EK  VR8X  d   WP                  ^,
          8X  g   VR8X  g   EK  V^ 8X  g   EK  V P                  P-                  Wk,          V^ ,          R7      p	V P                  V,          P5                  V	4       EKU  	  VR8X  Ed   VR8X  d   V P                  \         P"                  ! V P$                  4      ,          pVP'                  \         P(                  ! V P                   V4      4       VP'                  \         P(                  ! V P*                  V4      4       V P                  P-                  R^ RR7      p	MVR8X  d   V P.                  \         P0                  ! V P$                  4      ,          pVP'                  \         P(                  ! V P                   V4      4       VP'                  \         P(                  ! V P*                  V4      4       V P                  P-                  ^ RRR	7      p	VR9   d   \        V P                  4       F%  p
V P                  V
,          P3                  R4       K'  	  V P                  ^ ,          P5                  X	4       V P                  ^ ,          P3                  R
4       EMMVR8X  dA   \        V P                  4       F%  p
V P                  V
,          P3                  R
4       K'  	  EMVR8X  d   VR9   d   V P                  pMV P.                  p\        V4       F%  p
V P                  V
,          P3                  R
4       K'  	  \        X
^,           V P                  4       F%  pV P                  V,          P3                  R4       K'  	  Md\        V P                  4       FK  p
V P                  V
,          P3                  R4       V P                  V
,          PA                  . RORR7       KM  	  V P                  PC                  V4       V P                  PE                  V4       R # u upi )Nri   rs   Fr   r   rw   rh   )rR   rS   Zny1)rR   Znx1rS   TZaxes)r+   Zref_axry   rx   rz   rQ   Zactive)Zwhichr{   )ri   rh   r1   )rs   ri   )rz   rh   i)rs   rz   )      ?r   MbP?r   )#r~   r}   r6   r_   r7   rA   r4   _cbaraxes_class_factoryr:   rC   r   r=   r?   r   r|   r2   r   ZAxesXrF   ZappendZfrom_anyr   rW   r3   ZAxesYZset_visiblerV   r   rE   r>   rD   rB   Zset_positionrT   rU   )r   Z_Zcb_modeZcb_locationZhZvZh_ax_posZh_cb_posZszrl   rN   rO   rP   Zv_ax_posZv_cb_posr-   Zcountrj   s   &                 r   rG   ZImageGrid._init_locators  s	    %&&*;;%)%9%9%D%D"%)%8%8%C%C"
 4;;'	) ( $D$:$:;a +++79S9S9U 335 (	) %%--h;2D#Df$[[4::dmm#<<t':':B?@t'9'92>?--33qQB3G([[4::dmm#<<t':':B?@t'9'92>?--33qbQ3G4;;'q!--e4 (NN1..w7NN1))$/ q!12GCax--.ZZ6$--:JKZZa 0'-dmmA6FH v% F*$.3!8A't':':B?@t'9'92>?OOCF#HHRLw& F*$.3++/3It'9'92>?A't':':B?@3 36  !1!1!!4TrT!:;GCax,,-ZZ6$--:JKZZa 0'-dmmA6FH x' F*$.3!8A't':':B?@t'9'92>?OOCF#HHRLu$ F*$.3++/3It'9'92>?A't':':B?@3 <6 t{{#A((+HCmm//8=3;KKM#<M3N 0 PGMM!--g6& "33"mm77#=XkkAo6K-L 8 NG !$55"mm77#=XkkAo6K-L 8 NG q!227;F"6)cQh&'1c[[1_6L"mm77#A;8KK!Oc4I+J 8 LGNN3'88A!X-#q2H$-#("mm778=;CA; 8 HGNN3'88A5 $8 hg%[[4::dmm#<<t'9'92>?t':':B?@--33raR3H%[[4::dmm#<<t'9'92>?t':':B?@--33qbR3H..t{{+ANN1%11%8 ,q!227;q!--d34;;'q!--d3 (//5\q!--d3 "1q5$++.q!--e4 / 4;;'q!--e4q!../E5= / ? (
 	$$Q'""1%k)s   .A*u)r}   r|   r~   r   r   rn   )
r   r   r   r   ro   r   rG   r   r   r    r!   r#   r   rp   rp     s     g! !g! g!  g!  g!  'g! g!  g! #g! !g! g!R^& ^&r   rp   )Znumbersr   r<   Ztypesr   Znumpyr5   Z
matplotlibr   r   Zmatplotlib.gridspecr   Zaxes_dividerr   r   r   Zmpl_axesr	   r
   r   Z_make_class_factoryr   r$   rp   ZAxesGrid) r   r   <module>r      sd        " + 7 7 ,E E  33L(K A+ A+HQ& Q&h r   