o
    »Ae»  ã                   @   s°   d dl Zd dlmZ d dlmZ d dlm	Z
 d dlmZ d dlmZ d dlmZmZ d dlmZ d dlmZ dd„ Zed	gd
dddd„ ƒZedgd
dddd„ ƒZdd„ ZdS )é    N)Úimage_comparison)ÚSubplot)ÚFloatingAxesÚGridHelperCurveLinear)ÚFixedLocator)Úangle_helperc                  C   s$   t jdd} t| dƒ}|  |¡ d S )N©é   r	   ©Zfigsizeéo   )ÚpltÚfigurer   Úadd_subplot©ÚfigÚax© r   úq/home/www/facesmatcher.com/pyenv/lib/python3.10/site-packages/mpl_toolkits/axisartist/tests/test_floating_axes.pyÚtest_subplot   s   
r   zcurvelinear3.pngÚdefaultr	   )ÚstyleZtolc                  C   s„  t jdd} t ¡  tjd d¡tj 	¡  }t
|dt d¡tg d¢ƒt ¡ d d}| jt|d	}d
}t ¡  dd| ¡| }t
|ddd
| d| ftg d¢ƒd}|jd|d |jd< }|jd j d¡ |jd j d¡ |jd  d¡ |jdd|dd}||jd< |jddd |j d¡ |j d¡ |j d¡ | |¡}g d¢g d ¢}	}
| |	|
¡ | |	|
d!¡\}| |j¡ d S )"Nr   r
   é´   é   )r   éh  é
   é   é   ©é   é   é   é   r   ©ÚextremesZgrid_locator1Úgrid_locator2Ztick_formatter1Ztick_formatter2©Z
axes_classÚgrid_helperr   r   r   r   )é   é<   éZ   )r#   r$   Úright)ÚaxesÚleftúTest 1úTest 2)r,   r*   Fé   Úbottom©r+   Úaxis_directionÚzT©ÚallÚlabelúz = ?ú0.5©éC   r)   éK   r'   ©r   r	   r!   r   úk-)r   r   ÚmtransformsÚAffine2DÚscaleÚnpÚpiÚmprojectionsÚ	PolarAxesÚPolarTransformr   r   Ú
LocatorDMSr   ÚFormatterDMSr   r   Znew_fixed_axisÚaxisr6   Úset_textÚset_visibleÚnew_floating_axisÚtoggleÚlineÚ	set_colorÚget_aux_axesÚscatterÚplotÚset_clip_pathÚpatch)r   Útrr&   Úax1Zr_scaleZtr2Zgrid_helper2rH   Úax2ÚxxÚyyÚlr   r   r   Útest_curvelinear3   sJ   ÿ
ú
ý
ÿ

rZ   zcurvelinear4.pnggÍÌÌÌÌÌì?c            	      C   sH  dt jd< t jdd} t ¡  tjd d¡tj	 
¡  }t|dt d¡tg d	¢ƒt ¡ d d
}| jt|d}| ¡  |jd j d¡ |jd j d¡ |jd  d¡ |jdd|dd}||jd< |jddd |j d¡ |j d¡ |j d¡ |j d¡ | |¡}g d¢g d¢}}| ||¡ | ||d¡\}| |j ¡ d S )Nr    ztext.kerning_factorr   r
   r   r   )éx   r'   r   r   r	   r   r"   r%   r,   r-   r*   r.   ÚtopFéF   r0   r1   r3   Tr4   r7   r8   r9   r<   r=   )!r   ZrcParamsr   r>   r?   r@   rA   rB   rC   rD   rE   r   r   rF   r   rG   r   r   ÚclearrH   r6   rI   rJ   rK   rL   Zset_axis_directionrM   rN   rO   rP   rQ   rR   rS   )	r   rT   r&   rU   rH   rV   rW   rX   rY   r   r   r   Útest_curvelinear4D   s@   
ÿ
ú
ÿ

r_   c                  C   sJ   t  ¡ } t| dƒ}|  |¡ |jdddd|jd< |jd jdks#J ‚d S )Nr   r   r   r,   )Z	nth_coordÚvaluer2   Úy)r   r   r   r   rK   rH   Z_axis_directionr   r   r   r   Útest_axis_directionl   s   

ÿrb   )ÚnumpyrA   Zmatplotlib.pyplotZpyplotr   Zmatplotlib.projectionsZprojectionsrC   Zmatplotlib.transformsZ
transformsr>   Zmatplotlib.testing.decoratorsr   Z!mpl_toolkits.axisartist.axislinesr   Z%mpl_toolkits.axisartist.floating_axesr   r   Z#mpl_toolkits.axisartist.grid_finderr   Zmpl_toolkits.axisartistr   r   rZ   r_   rb   r   r   r   r   Ú<module>   s    
-
'