
    ^j                     R   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y)    N)image_comparison)IdentityTransform)AxesZeroSubplotZeroSubplot)AxesSubplotHostzSubplotZero.pngmpl20)stylec                     t        j                         } t        | ddd      }| j                  |       |j                  d   j                  d       |j                  d   j                  j                  d       dD ]   }|j                  |   j                  d       " t        j                  ddt        j                  z  d	      }|j                  |t        j                  |             |j                  d
       y )N   xzeroTz	Axis Zero)toprightFr      {Gz?Test)pltfigurer   add_subplotaxisset_visiblelabelset_textnparangepiplotsin
set_ylabel)figaxnxxs       w/var/www/ramen.bs-engineer-server.com/venv/lib/python3.12/site-packages/mpl_toolkits/axisartist/tests/test_axislines.pytest_SubplotZeror&   
   s    
**,C	S!Q	"BOOBGGG  &GGG##K0 &

u%& 
1a"%%i	&BGGBr
MM&    zSubplot.pngc                     t        j                         } t        | ddd      }| j                  |       t	        j
                  ddt        j                  z  d      }|j                  |t	        j                  |             |j                  d       |j                  d   j                  j                  d       |j                  d   j                  j                  d       |j                  d	   j                  d
       y )Nr   r   r   r   r   leftFr   bottomTk0)r   r   r   r   r   r   r   r   r   r    r   major_ticksset_tick_out	set_label)r!   r"   r$   s      r%   test_Subplotr/      s    
**,C	aA	BOOB	1a"%%i	&BGGBr
MM&GGFO,,U3GGG  --e4GGH&r'   c                      t        j                         } t        | g d      }| j                  |       |j	                  g dg d       |j                  d       | j                  j                          y )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_Axesr7   -   sN    
**,C	c)	*BLLGGIy!MM%JJOOr'   z!ParasiteAxesAuxTrans_meshplot.pngTg333333?)remove_textr   tolc            	         t         j                  j                  ddd       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         }	|j                  |	       |	j                  t               d       }
|j                  d      r t        |
|      ||| d dd df          n t        |
|      |||        |	j                  dd       |	j!                  dd        
j#                  ||| d       y )Ninzxtick.directionzytick.direction)   r=   r   r   r   r   r=   )pcolor
pcolormeshcontourfr   r1   )viewlim_moder@      k)colors)r   rcParamsupdater   onesr   meshgridr   	enumerater	   r   get_aux_axesr   
startswithgetattrset_xlimset_ylimcontour)dataxyr$   yy	funcnamesr!   inameax1ax2s              r%   test_ParasiteAxesAuxTransr\   6   sl    LLDTJK776?DDJDAJDQKDAJDBK
		!A
		!A[[AFB4I
**,CY' 4#q!QqS)02F??8$GCr2tCRC"H~6GCr2t,QQ KKBSK)r'   zaxisline_style.png)r8   r   c                     t         j                  j                  ddd       t        j                  d      } | j	                  t
              }|j                  d   j                  d       |j                  d   j                  d       |j                  d	   j                  d
       |j                  d	   j                  d       dD ]   }|j                  |   j                  d       " y )Nr;   r<   r>   figsize
axes_classr   -|>Tyzero->r)   r   r*   r   F	r   rH   rI   r   r   r   r   set_axisline_styler   r!   r"   	directions      r%   test_axisline_stylerj   W   s     LLDTJK
**V
$C	H	-BGGG''.GGG  &GGG''-GGG  &7 .	
	&&u-.r'   zaxisline_style_size_color.pngc                     t         j                  j                  ddd       t        j                  d      } | j	                  t
              }|j                  d   j                  ddd	
       |j                  d   j                  d       |j                  d   j                  d       |j                  d   j                  d       dD ]   }|j                  |   j                  d       " y )Nr;   r<   r>   r^   r`   r   rb   g       @rsize	facecolorTrc   z->, size=1.5re   Frf   rh   s      r%   test_axisline_style_size_colorrp   f   s     LLDTJK
**V
$C	H	-BGGG''C3'GGGG  &GGG''7GGG  &7 .	
	&&u-.r'   zaxisline_style_tight.pngc                     t         j                  j                  ddd       t        j                  dd      } | j	                  t
              }|j                  d   j                  dd	d
       |j                  d   j                  d       |j                  d   j                  d       |j                  d   j                  d       dD ]   }|j                  |   j                  d       " y )Nr;   r<   r>   tight)r_   layoutr`   r   rb   rE   grm   Trc   z
->, size=8re   Frf   rh   s      r%   test_axisline_style_tightru   v   s     LLDTJK
**VG
4C	H	-BGGG''A'EGGG  &GGG''5GGG  &7 .	
	&&u-.r'   zsubplotzero_ylabel.pngc                  "   t        j                         } | j                  dt              }|j	                  dddd       |j
                  d   }|j                  d       |j
                  d	   j                  d
       |j                  d       y )No   r`   )   rT   rU   )xlimylimxlabelylabel)r   rc   Tre   Frd   )r   r   r   r   setr   r   rg   )r!   r"   	zero_axiss      r%   test_subplotzero_ylabelr      sv    
**,C		5BFFgc#F>()I$GG,-99%@  &r'   )numpyr   matplotlib.pyplotpyplotr   matplotlib.testing.decoratorsr   matplotlib.transformsr   !mpl_toolkits.axisartist.axislinesr   r   r   mpl_toolkits.axisartistr   r	   r&   r/   r7   r\   rj   rp   ru   r    r'   r%   <module>r      s
     : 3 L L 5 $%W5 6" =/1' 2'  67"'u>*>*> '(d'J. K. 23!.!. -.D!.!. +,G<' ='r'   