+
     ]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                sl   \         P                  ! \        V 4      \        V 4      \        \        RW.4      4      4       Fq  w  w  r4w  rVw  pw  rWS8:  d   K  V ^ ,          P                  V,          P                  WF4      WV3,          8X  d   KP  Q RY5WV3,          '       d   RMRV3,          4       h	  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xyz,axes %i and %i incorrectly %ssharing %s axisznot  N)	itertoolsZproduct	enumeratezipZ_shared_axesZjoined)
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      s    
 7@6G6GcNcNc$ 456782	9B2r>D 81v""4(//9VF^K 	@:&R..b$>@ @	@K78    c                s   \        \        WV4      4       F  w  pw  rEpVP                  4       VP                  P                  .,            F%  pVP                  4       V8X  d   K  Q RV RV 24       h	  VP                  4       VP                  P                  .,            F%  pVP                  4       V8X  d   K  Q RV RV 24       h	  V'       g   VP                  4       R8X  g   Q hV'       d   K  VP                  4       R8X  d   K  Q h	  R# )z<Check that the x and y ticklabel visibility is as specified.zVisibility of x axis #z is incorrectly zVisibility of y axis #r   N)
r   r   Zget_xticklabelsxaxisZ
offsetTextget_visibleZget_yticklabelsyaxis
get_xlabel
get_ylabel)r	   	x_visible	y_visibleiaxZvxZvyZls   &&&     r
   check_ticklabel_visibler      s   $S%CD<BB##%)<)<(===A==?b( E,QC/?tDE( > ##%)<)<(===A==?b( E,QC/?tDE( >
 ==?b(((r==?b((( Er   c                s^   \        W4       FG  w  r4VP                  P                  4        F$  pVP                  P	                  4       V8X  d   K$  Q h	  KI  	  \        W4       FG  w  r2VP
                  P                  4        F$  pVP                  P	                  4       X8X  d   K$  Q h	  KI  	  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_ticksZ	tick1liner   r   )r	   r   r   r   visibleZtick   &&&   r
   check_tick1_visibler   .   s     C+HH,,.D>>--/7::: / , c-HH,,.D>>--/7::: / .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onesboolZzerosZarraypltsubplotsr   Zcloser   )ZrdimZsharer   fa1a2a3a4r	   ZopsZxoZyos               r
   test_sharedr1   <   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   )r2   r3   r4   figr	   r   r   r
   test_label_outerr>   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*   r9   Zadd_gridspecadd_subplotaxesr<   r   )r=   Zgsr-   r.   r/   r0   r   s          r
   test_label_outer_spanrB      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*   rA   r<   r   r8       r
   test_label_outer_non_gridspecrE      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_movedrH      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blahrG   NrF   )pytestraises
ValueErrorr*   r+    r   r
   test_exceptionsrM      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!   r=   r	          r
   test_subplots_offsettextrO      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Y;'       d    V^ 8H  8X  g   Q hY;'       d    V^8H  8X  g   Q hY;'       d    V^ 8H  8X  g   Q hY;'       d    V^8H  8X  d   K  Q h	  R#   + '       g   i     L; i)	zxtick.labeltopzxtick.labelbottomzytick.labelleftzytick.labelrightTr"   NZlabel2OnZlabel1On)	r*   Z
rc_contextr9   r+   r(   ndenumerater   Z_major_tick_kwr   )rP   rQ   rR   rS   r	   r   jr   ZxtopZxbottomZyleftZyrights   &&&&        r
   test_subplots_hide_ticklabelsrV      s*    
)30CV*D2DeM 
N 
Njjl##Aqd#C
N nnS)
xx&&z2(())*5''
3((4Q''',,a1f---!q&)))**AF+++ *
N 
Ns   )EE	xlabel_positionylabel_positionc                 st   \         P                  ! 4       P                  ^^RRR7      p\        P                  ! V4       F  w  w  r4pVP                  RRR7       VP                  P                  V 4       VP                  P                  V4       VP                  4        \        VP                  4       4      V R8H  ;'       d    V^8H  ;'       g    V R8H  ;'       d    V^ 8H  8X  g   Q h\        VP                  4       4      VR8H  ;'       d    V^ 8H  ;'       g    VR	8H  ;'       d    V^8H  8X  d   K  Q h	  R
# )r?   Tr"   r5   r6   r7   rQ   rP   rR   rS   N)r*   r9   r+   r(   rT   r:   r   Zset_label_positionr   r<   r)   r   r   )rW   rX   r	   r   rU   r   s   &&    r
   test_subplots_hide_axislabelsrY      s    **,

1T$

?CnnS)

eE*
##O4
##O4
BMMO$x'22AF 3 3%'22AF4 	4 4 BMMO$v%00!q& 5 5')44a1f6 	6 6 *r   c                  s    \         P                  ! 4       w  rVP                  4       P                  4       VP                  4       8X  g   Q hR # )N)r*   r+   Zget_subplotspecZget_gridspec)r=   r   s     r
   test_get_gridspecrZ      s6    llnGC,,."//2CCCCr   c                  s    R R/p R^^./p\         P                  ! ^^V VR7      w  r#V R R/8X  g   Q hVR^^./8X  g   Q hR# )r#   r   width_ratios)
subplot_kwgridspec_kwN)r*   r+   )r\   r]   r=   r   rN   r
   test_dont_mutate_kwargsr^      s]    E"J!Aq6*Kll1aJ'24GC(E****>Aq62222r   r[   height_ratiosZpng)Z
extensionsc                 s`    V P                  ^^VVR7       VP                  ^^RVRV/R7       R# )r   r_   r[   r_   r[   r]   N)r+   )fig_testfig_refr_   r[   s   &&&&r
   test_width_and_height_ratiosrd      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`   r_   r[   ra   N)re   Brf   )re   ZCZD)subplot_mosaic)rb   rc   r_   r[   Zmosaic_specs   &&&& r
   #test_width_and_height_ratios_mosaicrh     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)r_   )Zmatchr]   Nr[   )r'   r   r?   )rI   rJ   rK   Zgetattrr*   )ZmethodZargss   &&r
   test_ratio_overlapping_kwsri     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                  sr   \         P                  ! 4       p \        V P                  4       \        4      '       g   Q h\        V P                  . ROR7      \        4      '       d   Q h\        P                  ! \        4      ;_uu_ 4        \        V . RO. ROR7       RRR4       R#   + '       g   i     R# ; i)r    )ZrectNrC   )
r*   r9   Z
isinstancer@   r   Zadd_axesrI   rJ   Z	TypeErrorr   )r=   rD   r
   test_old_subplot_compatrj      so    
**,Ccoo'5555#,,L,9;GGGG	y	!	!S,\2 
"	!	!	!s   B%%B6	)r   ZtightZconstrained)r'   r?   r   )r+   )r   r?   )rg   )zabc;def)%r   ZplatformZnumpyr(   rI   Z
matplotlibr;   Zmatplotlib.axesr   r   Zmatplotlib.pyplotZpyplotr*   Zmatplotlib.testing.decoratorsr   r   r   r   r   r1   ZmarkZparametrizer>   rB   rE   rH   rM   ZmachinerO   rV   rY   rZ   r^   rd   rh   ri   rj   rL   r   r
   <module>rk      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   