+
     ]iJ+  c                   s   ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIHtH	t	 ^ RI
Ht ^ RIHtHt R tR tR tR t]P(                  P+                  RR	R
.4      ]P(                  P+                  R. R*O4      ]P(                  P+                  RR	R
.4      R 4       4       4       tR tR tR tR t]! R.]P6                  ! 4       R8X  d   ^ MRR7      R 4       t]P(                  P+                  RR	R
.4      ]P(                  P+                  RR	R
.4      ]P(                  P+                  RR	R
.4      ]P(                  P+                  RR	R
.4      R 4       4       4       4       t]P(                  P+                  RRR.4      ]P(                  P+                  RRR.4      R 4       4       tR tR  t ]P(                  P+                  R!R. R+O.4      ]P(                  P+                  R"R^^..4      ]! R#.R$7      R% 4       4       4       t!]P(                  P+                  R!R. R+O.4      ]P(                  P+                  R"R^^..4      ]! R#.R$7      R& 4       4       4       t"]P(                  P+                  R'R,R-.4      R( 4       t#R) t$R# ).    N)AxesSubplotBase)check_figures_equalimage_comparisonc                s    \         P                  ! \        V 4      \        V 4      \        \        RW.4      4      4       F  w  w  r4w  rVw  pw  rWS8:  g   K  K  	  R# )z
x_shared and y_shared are n x n boolean matrices; entry (i, j) indicates
whether the x (or y) axes of subplots i and j should be shared.
ZxyN)	itertoolsZproduct	enumeratezip)
axsZx_sharedZy_sharedZi1Zax1Zi2Zax2Zi3ZnameZshareds
   &&&       E/usr/lib64/python3.14/site-packages/matplotlib/tests/test_subplots.pycheck_sharedr
      sV    
 7@6G6GcNcNc$ 456782	9B2r>D 878    c                s:   \        \        WV4      4       F  w  pw  rEpVP                  4       VP                  P                  .,            F  pK  	  VP                  4       VP                  P                  .,            F  pK  	  V'       g   V'       d   K  K  	  R# )z<Check that the x and y ticklabel visibility is as specified.N)r   r   Zget_xticklabelsxaxisZ
offsetTextZget_yticklabelsyaxis)r   	x_visible	y_visibleiaxZvxZvyZls   &&&     r	   check_ticklabel_visibler      sy    $S%CD<BB##%)<)<(===A= ##%)<)<(===A=
 r Er   c                s    \        W4       F&  w  r4VP                  P                  4        F  pK  	  K(  	  \        W4       F&  w  r2VP                  P                  4        F  pK  	  K(  	  R# )zz
Check that the x and y tick visibility is as specified.

Note: This only checks the tick1line, i.e. bottom / left ticks.
N)r   r   Zget_major_ticksr   )r   r   r   r   visibleZtick   &&&   r	   check_tick1_visibler   .   sR     C+HH,,.D. , c-HH,,.D. .r   c                  s   Rp R\         P                  ! V R,          \        R7      R\         P                  ! V R,          \        R7      R\         P                  ! . RO. RO. RO. RO.4      R\         P                  ! . RO. RO. RO. RO.4      /pR	R. ROR. RORR.^,          RR.^,          RR.^,          R. RO/R
R. RORR.^,          R. RORR.^,          RR.^,          R. RO//pVR,          VR&   VR,          VR&   \
        P                  ! ^^4      w  pw  w  rEw  rgWEWg.p\        WR,          VR,          4       \
        P                  ! V4       . ROp	V	 F  p
V	 F  p\
        P                  ! ^^WR7      w  pw  w  rEw  rgWEWg.p\        WV
,          W,          4       \        WR	,          V
,          VR
,          V,          4       \
        P                  ! V4       K  	  K  	  R# )   all:N   N)ZdtypenonerowFTcolxysharexshareyN)r   r   r   )FTFF)TFFF)FFFT)FFTFFFTTTFTF)FTr   r   r   r   r       )
npZonesZboolZzerosZarraypltsubplotsr
   Zcloser   )ZrdimZsharer   fa1a2a3a4r   ZopsZxoZyos               r	   test_sharedr,   <   s   D2774840BHHT"XT2288++++	- .
 288++++	- .E 11vz
vz0 1vz1
vz0G$ =E%L,E$K "ll1a0A(22
CFmU6]3IIaL ;CB&)ll1a&N#A#(22"CBi3#Cb)973<;KLIIaL  r   remove_ticksTFlayout_enginewith_colorbarc                 s   \         P                  ! VR 7      pVP                  ^^RRR7      pVP                   F_  pVP	                  RRR7       V'       d0   VP                  \        P                  P                  4       VR7       VP                  V R7       Ka  	  \        VP                  . R	O. R
O4       V '       d   \        VP                  . R	O. R
O4       R# \        VP                  . RO. RO4       R# ))ZlayoutTr   foobarZxlabelZylabelr   )Zremove_inner_ticksNr!   r"   )TTTT)r%   figurer&   ZflatsetZcolorbarmplZcmZScalarMappablelabel_outerr   r   )r-   r.   r/   figr   r   r   r	   test_label_outerr9   r   s     **M
*C
,,q!D,
6Chh
eE*LL..0RL8
,7	 
 ,.HJHH02L	N 	HH.0H	Jr   c                  s   \         P                  ! 4       p V P                  ^^4      pV P                  VR,          4      pV P                  VR,          4      pV P                  VR,          4      pV P                  VR,          4      pV P                   F  pVP                  4        K  	  \        V P                  . RO. RO4       R# )   N)r    :r    r   N):r#   r:   Nr    )r#   r   )r   r#   )FTFT)TTFF)r%   r4   Zadd_gridspecZadd_subplotaxesr7   r   )r8   Zgsr(   r)   r*   r+   r   s          r	   test_label_outer_spanr<      s    
**,C			!Q	B 
F	$B	F	$B	D	"B	D	"Bhh
 ,.HJr   c                  sr    \         P                  ! R4      p V P                  4        \        V .R.R.4       R# )r    TNr    r    r#   r#   )r%   r;   r7   r   r3       r	   test_label_outer_non_gridspecr?      s,    	,	BNNRD4&4&1r   c                  sf   \         P                  ! ^^RR7      w  p w  r\        V.R.R.4       VP                  P	                  4        \        V.R.R.4       \         P                  ! ^^RR7      w  p w  r\        V.R.R.4       VP
                  P                  4        \        V.R.R.4       R# )r#   Tr    Fr   N)r%   r&   r   r   Z	tick_leftr   Ztick_bottom)r'   r(   r)   s      r	   test_shared_and_movedrB      s     ,,q!D1KAxRD4&5'2HHRD4&5'2,,q!D1KAxRD5'D62HHRD5'D62r   c                  sd   \         P                  ! \        4      ;_uu_ 4        \        P                  ! ^^RR7       RRR4       \         P                  ! \        4      ;_uu_ 4        \        P                  ! ^^RR7       RRR4       R#   + '       g   i     LV; i  + '       g   i     R# ; i)r   ZblahrA   Nr@   )pytestraises
ValueErrorr%   r&    r   r	   test_exceptionsrG      s`    	z	"	"Q&) 
#	z	"	"Q&) 
#	" 
#	"	"	"	"s   B'BB	B/	zsubplots_offset_text.pngZx86_64gy&1?)Ztolc                  sl   \         P                  ! ^ RR4      p \         P                  ! ^ ^d^
4      R,           p\        P                  ! ^^RRR7      w  r#VR,          P	                  W 4       VR	,          P	                  W 4       VR
,          P	                  W4       VR,          P	                  W4       R# )r    g    _Bg    eAg     @r   r   r   N)r    r    )r#   r    )r    r#   )r#   r#   )r$   Zaranger%   r&   Zplot)r   r   r8   r          r	   test_subplots_offsettextrI      s     			!T3A
		!S"c!A||Aqu=HCINN1INN1INN1INN1r   topbottomleftrightc           
      s   \         P                  ! R V RVRVRV/4      ;_uu_ 4        \         P                  ! 4       P                  ^^RRR7      pRRR4       \        P
                  ! X4       F|  w  w  rVpVP                  P                  R,          pVP                  P                  R,          p	VP                  P                  R,          p
VP                  P                  R,          pK~  	  R#   + '       g   i     L; i)	zxtick.labeltopzxtick.labelbottomzytick.labelleftzytick.labelrightTr   NZlabel2OnZlabel1On)	r%   Z
rc_contextr4   r&   r$   ndenumerater   Z_major_tick_kwr   )rJ   rK   rL   rM   r   r   jr   ZxtopZxbottomZyleftZyrights   &&&&        r	   test_subplots_hide_ticklabelsrP      s     
)30CV*D2DeM 
N 
Njjl##Aqd#C
N nnS)
xx&&z2(())*5''
3((4	 *
N 
Ns   )C00D 	xlabel_positionylabel_positionc                 sL   \         P                  ! 4       P                  ^^RRR7      p\        P                  ! V4       Fa  w  w  r4pVP                  RRR7       VP                  P                  V 4       VP                  P                  V4       VP                  4        Kc  	  R# )r:   Tr   r0   r1   r2   N)
r%   r4   r&   r$   rN   r5   r   Zset_label_positionr   r7   )rQ   rR   r   r   rO   r   s   &&    r	   test_subplots_hide_axislabelsrS      sz     **,

1T$

?CnnS)

eE*
##O4
##O4
	 *r   c                  s4    \         P                  ! 4       w  rR # )Nr%   r&   )r8   r   s     r	   test_get_gridspecrU      s    llnGCr   c                  sR    R R/p R^^./p\         P                  ! ^^V VR7      w  r#R# )r   r   width_ratios)
subplot_kwgridspec_kwNrT   )rW   rX   r8   r   rH   r	   test_dont_mutate_kwargsrY      s5    E"J!Aq6*Kll1aJ'24GCr   rV   height_ratiosZpng)Z
extensionsc                 s`    V P                  ^^VVR7       VP                  ^^RVRV/R7       R# )r   rZ   rV   rZ   rV   rX   N)r&   )fig_testfig_refrZ   rV   s   &&&&r	   test_width_and_height_ratiosr_      sD    
 a-#/  1Q$m#\(3 4r   c                 sj    . RO. RO.pV P                  WBVR7       VP                  VRVRV/R7       R# )Ar[   rZ   rV   r\   N)r`   Bra   )r`   ZCZD)subplot_mosaic)r]   r^   rZ   rV   Zmosaic_specs   &&&& r	   #test_width_and_height_ratios_mosaicrc     sH    
 #O4KK)5  7;*M)<59 :r   zmethod,argsc                 s   \         P                  ! \        R R7      ;_uu_ 4        \        \        V 4      ! VR ^^.RR ^^.//  RRR4       \         P                  ! \        RR7      ;_uu_ 4        \        \        V 4      ! VR. RORR. RO//  RRR4       R#   + '       g   i     L]; i  + '       g   i     R# ; i)rZ   )ZmatchrX   NrV   )r#   r   r:   )rC   rD   rE   Zgetattrr%   )ZmethodZargss   &&r	   test_ratio_overlapping_kwsrd     s     
z	9	9Vd 	D1a& 	D*9Aq6)B	D 
: 
z	8	8Vd 	F 	F*8))D	F 
9	8 
:	9 
9	8	8s   B0B,B)	,B=	c                  s    \         P                  ! 4       p \        P                  ! \        4      ;_uu_ 4        \        V . RO. ROR7       RRR4       R#   + '       g   i     R# ; i)r    )ZrectNr=   )r%   r4   rC   rD   Z	TypeErrorr   )r8   r>   r	   test_old_subplot_compatre      s9    
**,C 
y	!	!S,\2 
"	!	!	!s   AA&	)r   ZtightZconstrained)r#   r:   r   )r&   )r   r:   )rb   )zabc;def)%r   ZplatformZnumpyr$   rC   Z
matplotlibr6   Zmatplotlib.axesr   r   Zmatplotlib.pyplotZpyplotr%   Zmatplotlib.testing.decoratorsr   r   r
   r   r   r,   ZmarkZparametrizer9   r<   r?   rB   rG   ZmachinerI   rP   rS   rU   rY   r_   rc   rd   re   rF   r   r	   <module>rf      s        -  O@ )";3l $7*JK4-8J 9 L 8J$J(23* -.#++-9auFF u.D%=1$/4-0, 1 0 2 /,$ *Xu,=>*VW,=>6 ? ?6D3 $	):;4!Q.9(4 ) : <4 $	):;4!Q.9(: ) : <: %) 
F
F3r   