o
    ÞÁgÔ!  ã                   @   sØ   d dl Z d dlZd dlZd dlmZ d dlZd dlZd dlmZ	 d dl
mZ dd„ Zdd„ Zd	d
„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd „ Zd!d"„ Zd#d$„ Zd%d&„ ZdS )'é    N)ÚPath)Úpyplot)ÚMatplotlibDeprecationWarningc              
   C   s¸   t tjƒjd d }| ¡ st d¡ t tjƒ ¡ }|  	d¡}| 
|d¡ tjtjt|ƒt|ƒgdd | d¡}||krZd 	tj| d¡| d¡d	d
ddd¡}t d| ¡ d S d S )Né   ztools/boilerplate.pyzboilerplate.py not foundz	pyplot.pyzutf-8T)ÚcheckÚ
zfound pyplot.pyzexpected pyplot.pyr   Ú )ÚfromfileÚtofileÚnÚlinetermzøpyplot.py is not up-to-date. Please run 'python tools/boilerplate.py' to update pyplot.py. This needs to be done from an environment where your current working copy is installed (e.g. 'pip install -e'd). Here is a diff of unexpected differences:
%s)r   ÚmplÚ__file__ÚparentsÚexistsÚpytestÚskipÚpltÚ	read_textÚjoinÚ
write_textÚ
subprocessÚrunÚsysÚ
executableÚstrÚdifflibÚunified_diffÚsplitÚfail)ÚtmpdirÚ
gen_scriptÚorig_contentsÚplt_fileÚnew_contentsÚdiff_msg© r&   úZ/home/ubuntu/cloudmapper/venv/lib/python3.10/site-packages/matplotlib/tests/test_pyplot.pyÚtest_pyplot_up_to_date   s2   

ÿ
üÿüÿùr(   c                 C   sÜ   t j ddd¡t j dd¡ddd„ƒƒ}t |¡ddd„ƒ}|d ƒ |d d	 |d d d
 |d d d | r7J ‚t t¡ |d d W d   ƒ n1 sLw   Y  t t¡ |d d ƒ W d   ƒ d S 1 sgw   Y  d S )Nz	(version)ÚoldÚnewÚkwoc                 S   ó   d S ©Nr&   ©r*   r+   r&   r&   r'   Úfunc*   s   z1test_copy_docstring_and_deprecators.<locals>.funcc                 S   r,   r-   r&   r.   r&   r&   r'   Úwrapper_func/   s   z9test_copy_docstring_and_deprecators.<locals>.wrapper_func)r*   )r+   r.   )r)   r-   )	r   Ú_apiÚrename_parameterÚmake_keyword_onlyr   Ú_copy_docstring_and_deprecatorsr   Úwarnsr   )Úrecwarnr/   r0   r&   r&   r'   Ú#test_copy_docstring_and_deprecators)   s    
ÿ"ÿr7   c                  C   sd   t  ¡ \} }t  d¡ | ¡ rJ ‚t  d¡ | ¡ sJ ‚t  ¡  | ¡ r&J ‚t  ¡  | ¡ s0J ‚d S )NFT)r   ÚsubplotsÚboxÚget_frame_on)ÚfigÚaxr&   r&   r'   Útest_pyplot_box>   s   

r=   c                   C   s   t  g d¢g d¢¡ d S )N)é   r   é   )r   Ú	stackplotr&   r&   r&   r'   Útest_stackplot_smokeJ   s   rA   c                   C   sr   t  t¡ tjdd W d   ƒ n1 sw   Y  t  t¡ tjdd W d   ƒ d S 1 s2w   Y  d S )Nr>   )Únrows)Úncols)r   ÚraisesÚ	TypeErrorr   Úsubplotr&   r&   r&   r'   Útest_nrows_errorO   s   ÿ"ÿrG   c                   C   s¬   t  ¡  t ¡ s
J ‚t  ¡  t ¡ rJ ‚W d   ƒ n1 sw   Y  t ¡ s*J ‚t  ¡  t ¡ r4J ‚t  ¡  t ¡ r?J ‚W d   ƒ n1 sIw   Y  t ¡ rTJ ‚d S r-   )r   Úionr   Úis_interactiveÚioffr&   r&   r&   r'   Ú	test_ioffV   ó   
ÿ
ÿrK   c                   C   s¬   t  ¡  t ¡ r
J ‚t  ¡  t ¡ sJ ‚W d   ƒ n1 sw   Y  t ¡ r*J ‚t  ¡  t ¡ s4J ‚t  ¡  t ¡ s?J ‚W d   ƒ n1 sIw   Y  t ¡ sTJ ‚d S r-   )r   rJ   r   rI   rH   r&   r&   r&   r'   Útest_iond   rL   rM   c                	   C   sd  t  ¡  t  ¡ . t ¡ rJ ‚t  ¡  t ¡ sJ ‚W d   ƒ n1 s$w   Y  t ¡ r/J ‚W d   ƒ n1 s9w   Y  t ¡ sDJ ‚t  ¡ " t  ¡  t ¡ rTJ ‚W d   ƒ n1 s^w   Y  W d   ƒ n1 smw   Y  t ¡ sxJ ‚t  ¡  t  ¡  W d   ƒ n1 s‹w   Y  t ¡ s–J ‚t  ¡  t  ¡ . t ¡ s¥J ‚t  ¡  t ¡ r°J ‚W d   ƒ n1 sºw   Y  t ¡ sÅJ ‚W d   ƒ n1 sÏw   Y  t ¡ rÚJ ‚t  ¡ " t  ¡  t ¡ sêJ ‚W d   ƒ n1 sôw   Y  W d   ƒ n	1 sw   Y  t ¡ rJ ‚t  ¡  t  ¡  W d   ƒ n	1 s$w   Y  t ¡ r0J ‚d S r-   )r   rH   rJ   r   rI   r&   r&   r&   r'   Útest_nested_ion_ioffr   sP   

ÿü

ÿ€ÿ

ÿ

ÿü

ÿ€ÿ

ÿrN   c               
   C   sH   zt  d¡ W d S  ty# }  zt| ƒdksJ ‚W Y d } ~ d S d } ~ ww )Ngš™™™™™ñ?zQclose() argument must be a Figure, an int, a string, or None, not <class 'float'>)r   ÚcloserE   r   )Úer&   r&   r'   Ú
test_closež   s   €ÿrQ   c                  C   s^   t  d¡} | t  ¡ u sJ ‚t  d¡}|t  ¡ u sJ ‚t  d¡}| t  ¡ u s'J ‚| |u s-J ‚d S )Néy   éz   )r   rF   Úgca©Úax1Úax2Úax3r&   r&   r'   Útest_subplot_reuse¦   s   


rY   c                  C   sÆ   t  ¡  t  ¡ } t  ¡ }| d usJ ‚|| usJ ‚t  ¡  t  ¡  t jdd} t jdd}| d us2J ‚|| us8J ‚t  ¡  t  ¡  t jdd} t  ¡ }| d usPJ ‚|jdksWJ ‚|| us]J ‚t  ¡  d S )NÚpolar©Ú
projectionÚrectilinear)r   ÚfigureÚaxesrO   Úname©r<   rV   r&   r&   r'   Útest_axes_kwargs°   s&   rb   c                  C   sê   t  ¡ } t  ddd¡}t  ddd¡}t  ddd¡}t jddddd}t jddddd}|d us1J ‚||u s7J ‚||us=J ‚||usCJ ‚||u sIJ ‚|| jvsPJ ‚|| jv sWJ ‚|| jv s^J ‚|jdkseJ ‚|jdkslJ ‚|jdkssJ ‚d S )Nr>   r   rZ   r[   r]   )r   r^   rF   r_   r`   )r;   r<   rV   rW   rX   Úax4r&   r&   r'   Útest_subplot_replace_projectionÉ   s"   rd   c                  C   sX   t jddd} t jddd}| |u sJ ‚t jddd}| |us!J ‚| t  ¡ jvs*J ‚d S )NrZ   r   )r\   Útheta_offsetr>   )r   rF   Úgcfr_   rU   r&   r&   r'   Útest_subplot_kwarg_collisionâ   s   rg   c                  C   s,  t  ¡  t  ¡ } t  ¡ }| d usJ ‚|| u sJ ‚t  ¡  t  ¡  tjtdd t jdd} W d   ƒ n1 s8w   Y  t  ¡ }| d usGJ ‚|| u sMJ ‚|jdksTJ ‚t  ¡  t  ¡  t  ¡ } tjtdd t jdd}W d   ƒ n1 sxw   Y  | d usƒJ ‚|| u s‰J ‚|jdksJ ‚t  ¡  d S )Nz5Calling gca\(\) with keyword arguments was deprecated©ÚmatchrZ   r[   r]   )r   r^   rT   rO   r   r5   r   r`   ra   r&   r&   r'   Útest_gca_kwargsë   s<   þýþýrj   c                  C   s®   t  d¡} | t  ¡ u sJ ‚| t  d¡u sJ ‚t jddd}|t  ¡ u s%J ‚| t  ¡ jvs.J ‚|t  d¡u s7J ‚t jddd}|t  ¡ u sFJ ‚||usLJ ‚|t  ¡ jvsUJ ‚d S )Néo   rZ   r[   r]   )r   rF   rT   rf   r_   rU   r&   r&   r'   Útest_subplot_projection_reuse  s   
rl   c                  C   sˆ   t jddd} t jddd}t jdddd}| |u sJ ‚| |u s"J ‚tjtdd t jddd	d}W d   ƒ d S 1 s=w   Y  d S )
Nrk   rZ   r[   T)rZ   )rZ   r\   zpolar=True, yet projection='3d'rh   Ú3d)r   rF   r   rD   Ú
ValueErrorrU   r&   r&   r'   Ú test_subplot_polar_normalization#  s   ÿ"þro   c                  C   sT   t  ¡ } d}|D ]}t j|d}|t  ¡ u sJ ‚|j|ksJ ‚| |us%J ‚|} qd S )N)ÚaitoffÚhammerÚlambertÚ	mollweiderZ   r]   rm   r[   )r   rF   r`   )r<   ÚprojectionsÚprojÚax_nextr&   r&   r'   Útest_subplot_change_projection/  s   ûrw   )r   r   r   Úpathlibr   r   Ú
matplotlibr   r   r   Úmatplotlib.cbookr   r(   r7   r=   rA   rG   rK   rM   rN   rQ   rY   rb   rd   rg   rj   rl   ro   rw   r&   r&   r&   r'   Ú<module>   s2    ,
	"