
    P/Ph	                        d dl Zd dlmZ d dlmZ d dlmZ d dl	m
Z
mZmZ d dlmZmZ  edgd          d	             Z ed
gd          d             Zd Z edgddd          d             Z edgdd          d             Z edgdd          d             Z edgdd          d             Z edgd          d             ZdS )    N)image_comparison)IdentityTransform)AxesZeroSubplotZeroSubplot)AxesSubplotHostzSubplotZero.pngdefault)stylec                  ,   dt           j        d<   t          j                    } t          | ddd          }|                     |           |j        d                             d           |j        d         j                            d           dD ]"}|j        |                             d           #t          j
        d	d
t          j        z  d          }|                    |t          j        |                     |                    d           d S )N   text.kerning_factor   xzeroTz	Axis Zero)toprightFr      {Gz?Test)pltrcParamsfigurer   add_subplotaxisset_visiblelabelset_textnparangepiplotsin
set_ylabel)figaxnxxs       l/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/mpl_toolkits/axisartist/tests/test_axislines.pytest_SubplotZeror)   
   s     +,CL&'
*,,C	S!Q	"	"BOOBGG  &&&GG##K000 & &

u%%%%	1a"%i	&	&BGGBr

MM&    zSubplot.pngc                  ,   dt           j        d<   t          j                    } t          | ddd          }|                     |           t          j        ddt
          j        z  d          }|                    |t          j	        |                     |
                    d           |j        d         j                            d	           |j        d
         j                            d	           |j        d
                             d           d S )Nr   r   r   r   r   r   r   r   TbottomTk0)r   r   r   r   r   r   r   r    r!   r"   r#   r   major_ticksset_tick_out	set_label)r$   r%   r'   s      r(   test_Subplotr1      s     +,CL&'
*,,C	aA		BOOB	1a"%i	&	&BGGBr

MM&GEN++D111GH!..t444GH&&&&&r*   c                  
   t          j                    } t          | g d          }|                     |           |                    g dg d           |                    d           | j                                         d S )N)g333333?g?g?g?)r   r      )r   r   r   log)r   r   r   add_axesr!   
set_xscalecanvasdraw)r$   r%   s     r(   	test_Axesr9   3   s{    
*,,C	c)))	*	*BLLGGIIIyyy!!!MM%JOOr*   z!ParasiteAxesAuxTrans_meshplot.pngTg333333?)remove_textr   tolc            	      (   t          j        d          } d| d<   d| dd d f<   d| dd d f<   d| d d df<   d| d d df<   t          j        d          }t          j        d          }t          j        ||          \  }}g d}t	          j                    }t          |          D ]\  }}t          |dd	|dz             }	|                    |	           |		                    t                      d 
          }
|                    d          r( t          |
|          ||| d dd df                    n t          |
|          |||            |	                    d           |	                    d           |
                    ||| d           d S )N)r   r   r   r   r   r   r   )pcolor
pcolormeshcontourfr   r3   )viewlim_moder?   )r      k)colors)r   onesr   meshgridr   r   	enumerater	   r   get_aux_axesr   
startswithgetattrset_xlimset_ylimcontour)dataxyr'   yy	funcnamesr$   inameax1ax2s              r(   test_ParasiteAxesAuxTransrY   <   s    76??DDJDAAAJDQQQKDAJDBK
	!A
	!A[AFB444I
*,,CY''  4#q!QqS))022FF??8$$ 	-GCr2tCRC"H~6666GCr2t,,,VVKKBSK)))))r*   zaxisline_style.pngmpl20)r:   r   c                     t          j        d          } |                     t                    }|j        d                             d           |j        d                             d           |j        d                             d           |j        d                             d           d	D ]"}|j        |                             d
           #d S )Nr=   figsize
axes_classr   -|>Tyzero->leftr   r,   r   Fr   r   r   r   r   set_axisline_styler   r$   r%   	directions      r(   test_axisline_styleri   \   s    
*V
$
$
$C	H	-	-BGG''...GG  &&&GG''---GG  &&&7 . .	
	&&u----. .r*   zaxisline_style_size_color.pngc                     t          j        d          } |                     t                    }|j        d                             ddd           |j        d                             d	           |j        d
                             d           |j        d
                             d	           dD ]"}|j        |                             d           #d S )Nr=   r\   r^   r   r`   g       @rsize	facecolorTra   z->, size=1.5rc   Fre   rg   s      r(   test_axisline_style_size_colorro   i   s     *V
$
$
$C	H	-	-BGG''C3'GGGGG  &&&GG''777GG  &&&7 . .	
	&&u----. .r*   zaxisline_style_tight.pngc                     t          j        d          } |                     t                    }|j        d                             ddd           |j        d                             d	           |j        d
                             d           |j        d
                             d	           dD ]"}|j        |                             d           #|                                  d S )Nr=   r\   r^   r   r`   rD   grl   Tra   z
->, size=8rc   F)r   r   r   r   r   rf   r   tight_layoutrg   s      r(   test_axisline_style_tightrs   w   s     *V
$
$
$C	H	-	-BGG''A'EEEGG  &&&GG''555GG  &&&7 . .	
	&&u----r*   zsubplotzero_ylabel.pngc                  D   t          j                    } |                     dt                    }|                    dddd           |j        d         }|                    d           |j        d	                             d
           |                    d           d S )No   r^   )   rQ   rR   )xlimylimxlabelylabel)r   ra   Trc   Frb   )r   r   r   r   setr   r   rf   )r$   r%   	zero_axiss      r(   test_subplotzero_ylabelr~      s    
*,,C		5	5BFFgc#F>>>()I$G,-99%@@@  &&&&&r*   )numpyr   matplotlib.pyplotpyplotr   matplotlib.testing.decoratorsr   matplotlib.transformsr   !mpl_toolkits.axisartist.axislinesr   r   r   mpl_toolkits.axisartistr   r	   r)   r1   r9   rY   ri   ro   rs   r~    r*   r(   <module>r      s             : : : : : : 3 3 3 3 3 3 L L L L L L L L L L 5 5 5 5 5 5 5 5 $%Y777  87( =/333' ' 43'&   67")@ @ @* *@ @*< '(d'JJJ	. 	. KJ	. 23! ! !	. 	.! !	. -.D! ! ! ! ! +,G<<<' ' =<' ' 'r*   