
    h,                     B    S SK Jr  S SKJr  S SK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    P/var/www/html/env/lib/python3.13/site-packages/matplotlib/tests/test_gridspec.py
test_equalr
      sH    			1a	 Bd8r$xad8r!Q$x    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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_reprr      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 SubplotSpec)match)	pltsubplotsr   GridSpecFromSubplotSpecget_subplotspecget_topmost_subplotspecr   r   	TypeError)figaxsr   s      r	   test_subplotspec_argsr*   )   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;)matplotlib.gridspecr   matplotlib.pyplotpyplotr"   r   r
   r   r   r   r*   r   r   r	   <module>r.      s)    &   89D	Fr   