
    
3j                     V    S SK r S SKJr  S SKJr  S SKrS rS rS r	S r
S rS rS rg)	    Nc                  z    [         R                  " SS5      n U S   U S   :X  d   eU S S 2S4   U S S 2S4   :X  d   eg )N      )r   r   r   )gridspecGridSpecgss    X/home/wildlama/miniconda3/lib/python3.13/site-packages/matplotlib/tests/test_gridspec.py
test_equalr      sH    			1a	 Bd8r$xad8r!Q$x    c                  t    [         R                  " SS5      n U R                  SS9  U R                  S:X  d   eg )Nr   r   皙?left)r   r   updater   r   s    r
   test_updater      s2    			1a	 BII2I77b==r   c                      [         R                  " [        5         [        R                  " SS/ SQS9  SSS5        g! , (       d  f       g= f)U
Addresses issue #5835.
See at https://github.com/matplotlib/matplotlib/issues/5835.
r   r   r      )width_ratiosNpytestraises
ValueErrorr   r    r   r
   test_width_ratiosr      s.    
 
z	"!QY7 
#	"	"	   =
Ac                      [         R                  " [        5         [        R                  " SS/ SQS9  SSS5        g! , (       d  f       g= f)r   r   r   )height_ratiosNr   r   r   r
   test_height_ratiosr!      s.    
 
z	"!Qi8 
#	"	"r   c                     [         R                  " SSSS5      n U R                  S:X  d   eU R                  5         U R                  [        R
                  S   :X  d   e[        R                  " [        SS9   U R                  U R                  S-   S9  S S S 5        [        R                  " [        SS9   U R                  U R                  S-   S	9  S S S 5        [        R                  " [        SS9   [         R                  " SSS
S5        S S S 5        g ! , (       d  f       N= f! , (       d  f       N[= f! , (       d  f       g = f)Nr   g?zfigure.subplot.leftzleft cannot be >= rightmatchg{Gz?r   zbottom cannot be >= top)bottomg
ףp=
?)r   SubplotParamsr   reset
matplotlibrcParamsr   r   r   r   righttop)ss    r
   test_SubplotParamsr-   &   s    r2r2.A66S==GGI66Z(()>????	z)B	C	aggm$ 
D 
z)B	C	$ 
D 
z)B	Cr2sB/ 
D	C 
D	C 
D	C 
D	Cs$   8D6D(4D9
D%(
D69
Ec                      [         R                  " SS5      SSS24   n [        U 5      S:X  d   e[         R                  " SSSSS9n [        U 5      S:X  d   eg )	Nr   r   r   zGridSpec(3, 3)[2:3, 1:3])r   r   )r   r   )r    r   z9GridSpec(2, 2, height_ratios=(3, 1), width_ratios=(1, 3)))r   r   repr)sss    r
   	test_reprr1   7   sl    			1a	 AaC	(B81111			1a)/(.
0B 8CD D Dr   c                     [         R                  " SS5      u  p[        R                  " SSUS   R	                  5       S9nUR                  5       US   R	                  5       :X  d   e[        R                  " [        SS9   [        R                  " SSUS   S9nS S S 5        [        R                  " [        SS9   [        R                  " SSUS9nS S S 5        g ! , (       d  f       NG= f! , (       d  f       g = f)Nr   r   r   )subplot_specz%subplot_spec must be type SubplotSpecr#   )	pltsubplotsr   GridSpecFromSubplotSpecget_subplotspecget_topmost_subplotspecr   r   	TypeError)figaxsr	   s      r
   test_subplotspec_argsr<   B   s    ||Aq!HC		)	)!Q7:1v7M7M7O
QB%%'3q6+A+A+CCCC	y(O	P--aQH 
Q	y(O	P--aE 
Q	P 
Q	P	P	Ps   C<C-
C*-
C;)r(   matplotlib.gridspecr   matplotlib.pyplotpyplotr4   r   r   r   r   r!   r-   r1   r<   r   r   r
   <module>r@      s6     &   890"D	Fr   