403Webshell
Server IP : 35.80.110.71  /  Your IP : 216.73.216.117
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux ip-172-31-21-44 6.17.0-1019-aws #19~24.04.1-Ubuntu SMP Tue Jun 23 18:53:06 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/matplotlib/tests/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/matplotlib/tests/__pycache__/test_agg.cpython-312.pyc
�

G8�c�)��R�ddlZddlZddlmZddlmZmZddlZddl	m
Z
mZmZ
mZmZmZddlmZddlmZddlmZddlmZdd	lmZdd
lmZd�Zd�Zd
�Z d�Z!edgd��d��Z"d�Z#d�Z$ejJjMd�d��Z'd�Z(d�Z)d�Z*d�Z+d�Z,d�Z-d�Z.y)�N)�assert_array_almost_equal)�Image�TiffTags)�collections�patheffects�pyplot�
transforms�rcParams�
rc_context)�RendererAgg)�Figure)�imread)�Path)�image_comparison)�IdentityTransformc��tddg�}|jd�|jjd�t	j
�}|j
||j�d��|jd�|j
||j�d��|jd�ttt|�d�d	d
��y)N�皙�����?)rrr��?�none)�	facecolor�	edgecolorr�rr)���?rr�)�decimal)r
�
set_facecolor�patch�	set_alpha�io�BytesIO�savefig�
get_facecolor�seekr�tupler)�fig�bufs  �;/usr/lib/python3/dist-packages/matplotlib/tests/test_agg.py�test_repeated_save_with_alphar*s����!�S��
�C����k�"��I�I�����
�*�*�,�C��K�K���+�+�-� ��"��H�H�Q�K��K�K���+�+�-� ��"��H�H�Q�K��e�F�3�K��$5�6�4�&'�)�c
�&�tj�}tj�\}}t	j
t
ddgddgddgddgddgg�g�}|j|�|jdd�tj|�y)Ni������
���g����MbP?r)
r!r"�plt�subplotsr�PathCollectionr�
add_artist�set_xlimr#)�buff�f�ax�
collections    r)�!test_large_single_path_collectionr93s��
�:�:�<�D�

�L�L�N�E�A�r��+�+�	
��Q�x�"�a��2�r�(�S�"�I��Q�x�@�	A�B�D�J��M�M�*���K�K�����K�K��r+c��tjd�\}}d}tj|�}|j	|�|j||dz|dz�t
j�}|j|d��y)Nr��g�������?g333333�?�png��format)	r0r1�np�arange�semilogx�fill_betweenr!r"r#)r'r7�steps�datar(s     r)�test_marker_with_nanrEAsg���l�l�1�o�G�C���E�
�9�9�U��D��K�K����O�O�D�$�s�(�D��H�-�
�*�*�,�C��K�K��E�K�"r+c���tj�}t�}|j�}t	j
d�}|ddd�xxdzcc<|j
|�|j|d��y)N順����r<r=)r!r"r
r1r?�ones�plotr#)r5r'r7�pointss    r)�test_long_pathrMMsZ��
�:�:�<�D�
�(�C�	����B�
�W�W�W�
�F�
�3�Q�3�K�2��K��G�G�F�O��K�K��U�K�#r+zagg_filter.pngT)�remove_textc���
���d��d"�fd�	�Gd�d�}Gd�d|��
G�fd�d	|��G��
fd
�d|�}tj�\}}|jgd�gd
�ddddddd��	\}|jgd�gd�ddddddd��	\}|d�}||fD]�}|j�}|j	�}	|j||	�\}
|
j|�t
j|j�|jddd��}|
j|�|
j|j�dz
�|
j|�|
jd���|jdd �|j!dd �|j"j%d!�|j&j%d!�y)#Nc��tjd|dz||dd�z
|d|dz|d|d�z
f}tj|�}tj||j	�z|d��}||dz
|dzS)NrHrrrI�same)�mode)r?�r_�hanning�convolve�sum)�x�
window_len�s�w�ys     r)�smooth1dz!test_agg_filter.<locals>.smooth1dYs����E�E�
�a��d�F�Q�z�!�B��'�'��A�a��e�G�a��J�;�r�8I�6J�,J�J�
L���J�J�z�"���K�K��!�%�%�'�	�1�6�2����A��z�k�!�m�,�,r+rc���tt|�d�dzdz}tj�d||�}tj�d||�}|S)NrrHrr)�max�intr?�apply_along_axis)�A�sigmarXr\s   �r)�smooth2dz!test_agg_filter.<locals>.smooth2dasN�����U��Q�'�!�+�a�/�
�����!�Q�
�;������!�Q�
�;���r+c��eZdZd�Zd�Zd�Zy)�#test_agg_filter.<locals>.BaseFilterc��y)Nr���self�dpis  r)�get_padz+test_agg_filter.<locals>.BaseFilter.get_padis��r+c��td��)Nz"Should be overridden by subclasses)�NotImplementedError)ri�
padded_srcrjs   r)�
process_imagez1test_agg_filter.<locals>.BaseFilter.process_imagels��%�&J�K�Kr+c��|j|�}tj|||f||fdgd�}|j||�}|||fS)Nr�constant)rkr?�padro)ri�imrjrrrn�	tgt_images      r)�__call__z,test_agg_filter.<locals>.BaseFilter.__call__osW���,�,�s�#�C�����c�3�Z�#�s��V�$D� *�,�J��*�*�:�s�;�I��s�d�S�D�(�(r+N)�__name__�
__module__�__qualname__rkrorurgr+r)�
BaseFilterregs��	�	L�	)r+ryc� �eZdZdd�Zd�Zd�Zy)�%test_agg_filter.<locals>.OffsetFilterc��||_y�N)�offsets)rir~s  r)�__init__z.test_agg_filter.<locals>.OffsetFilter.__init__xs	��"�D�Lr+c�J�tt|j�dz|z�S)N�H)r_r^r~rhs  r)rkz-test_agg_filter.<locals>.OffsetFilter.get_pad{s ���s�4�<�<�(�2�-��3�4�4r+c���|j\}}tj|t|dz|z�d��}tj|t|dz|z�d��}|S)Nr�r)�axisr)r~r?�rollr_)rirnrj�ox�oy�a1�a2s       r)roz3test_agg_filter.<locals>.OffsetFilter.process_image~sU���\�\�F�B������S��b��3��%7�a�@�B�����c�"�r�'�C�-�0�0�q�9�B��Ir+N)r�rvrwrxrrkrorgr+r)�OffsetFilterr{vs��	#�	5�	r+r�c�*��eZdZdZdd�Zd�Z�fd�Zy)�'test_agg_filter.<locals>.GaussianFilterzSimple Gaussian filter.c�.�||_||_||_yr})rb�alpha�color)rirbr�r�s    r)rz0test_agg_filter.<locals>.GaussianFilter.__init__�s���D�J��D�J��D�Jr+c�>�t|jdzdz|z�S�Nrr�)r_rbrhs  r)rkz/test_agg_filter.<locals>.GaussianFilter.get_pad�s���t�z�z�!�|�b�(�3�.�/�/r+c����tj|�}|j|dd�dd�dd�f<�|dd�dd�df|jz|jdz|z�|dd�dd�df<|Sr�)r?�
empty_liker�r�rb)rirnrjrtrcs    �r)roz5test_agg_filter.<locals>.GaussianFilter.process_image�sk����
�
�j�1�I�"&�*�*�I�a��B�Q�B�h��!)�*�Q��1�W�*=��
�
�*J�*.�*�*�r�/�C�*?�"A�I�a��A�g���r+N)��?�rrr)rvrwrx�__doc__rrkro)rcs�r)�GaussianFilterr��s���%�	�
	0�	r+r�c�(��eZdZd��fd�	Zd�Zd�Zy)�)test_agg_filter.<locals>.DropShadowFilterc�>���|||�|_�|�|_yr})�gauss_filter�
offset_filter)rirbr�r�r~r�r�s     ��r)rz2test_agg_filter.<locals>.DropShadowFilter.__init__�s!��� .�u�e�U� C�D��!-�g�!6�D�r+c�~�t|jj|�|jj|��Sr})r^r�rkr�rhs  r)rkz1test_agg_filter.<locals>.DropShadowFilter.get_pad�s6���t�(�(�0�0��5��)�)�1�1�#�6�8�
8r+c�v�|jj||�}|jj||�}|Sr})r�ror�)rirnrj�t1�t2s     r)roz7test_agg_filter.<locals>.DropShadowFilter.process_image�s7���"�"�0�0��S�A�B��#�#�1�1�"�c�:�B��Ir+N)g333333�?r�rr�)r�r�s��r)�DropShadowFilterr��s���	7�	8�	r+r�)皙�����?r���������?)r�r�r�zbo-�brZr-r.zLine 1)�mec�mfc�lw�mew�ms�label)r�g�������?gffffff�?zro-�r�g@g�rL)rWr[�unitsr�TrrF)r)r0r1rK�	get_xdata�	get_ydata�update_from�mtransforms�offset_copy�
get_transform�figure�
set_transform�
set_zorder�
get_zorder�set_agg_filter�set_rasterizedr4�set_ylim�xaxis�set_visible�yaxis)ryr�r'r7�line1�line2�gauss�line�xx�yy�shadow�	transformr�r�r\rcs            @@@@r)�test_agg_filterr�Ws����-��
)�
)��z�����$
�:�
��l�l�n�G�C���W�W�_�o�u��#�!��r���K�F�E�
�W�W�_�o�u��#�!��r���K�F�E�
�Q��E����$���^�^�
��
�^�^�
���'�'�"�b�/������4� � �+�+�D�,>�,>�,@�"�)�)�.1�T��K�	����Y�'�	���$�/�/�+�c�1�2����e�$����d�#�#$�&�K�K��B���K�K��B���H�H������H�H����r+c���tjd��}tj�}t	j
t�5|j|�ddd�y#1swYyxYw)N)i,r;)�figsize)r0r�r!r"�pytest�raises�
ValueErrorr#)r'r5s  r)�test_too_large_imager��sH��

�*�*�[�
)�C�
�:�:�<�D�	���z�	"�����D�����s�A�A(c��td�}tj�\}}|j|t	j
|��|jj�tj�\}}dtd<|j|t	j
|��|jj�y)N���i�agg.path.chunksize)	�ranger0r1rKr?�sin�canvas�drawr
)rWr'r7s   r)�test_chunksizer��s���
�c�
�A��l�l�n�G�C���G�G�A�r�v�v�a�y���J�J�O�O���l�l�n�G�C��%(�H�
!�"��G�G�A�r�v�v�a�y���J�J�O�O�r+�Aggc���tjgd�gd��tj�}tj|dd��tj|�}|jddk(sJ�y)N�rrrH�rrr�jpgr�)r>rjrj)r�r�)r0rKr!r"r#r�open�info�r(rss  r)�
test_jpeg_dpir��sP���H�H�Y�	�"�
�*�*�,�C��K�K��E�s�+�	���C��B�
�7�7�5�>�Z�'�'�'r+c��ddlm}tj�}|�}|j	dd�tj�j|dd|i��tj|�}|jddk(sJ�y)Nr)�PngInfo�Software�testr<�pnginfo�r>�
pil_kwargs)�PIL.PngImagePluginr�r!r"�add_textr0r�r#rr�r�)r�r(r�rss    r)�test_pil_kwargs_pngr��sk��*�
�*�*�,�C��i�G����Z��(��J�J�L����U�	�7�7K��L�	���C��B�
�7�7�:��&�(�(�(r+c�Z�tj�}ddi}tj�j	|d|��tj|�}|jj�D��cic]#\}}tj|j|��%}}}|ddk(sJ�ycc}}w)N�descriptionz
test image�tiffr��ImageDescription)r!r"r0r�r#rr��tag_v2�itemsr�TAGS_V2�name)r(r�rs�k�v�tagss      r)�test_pil_kwargs_tiffr��s���
�*�*�,�C���.�J��J�J�L����V�
��C�	���C��B�46�I�I�O�O�4E�F�D�A�q�H���Q��$�$�a�'�F�D�F��"�#�|�3�3�3��Gs�1(B'c��tjgd�gd��tj�}ddi}tj|d|��t|�dk(sJ�tj�}ddi}tj|d|��t|�dk(sJ�|j
�j|j
�jkDsJ�y)Nr�r��qualityr�webpr��d)r0rKr!r"r#�len�	getbuffer�nbytes)�	buf_small�pil_kwargs_low�	buf_large�pil_kwargs_highs    r)�test_pil_kwargs_webpr�s����H�H�Y�	�"��
�
��I���^�N��K�K�	�&�^�D��~��!�#�#�#��
�
��I� �#�&�O��K�K�	�&�_�E����1�$�$�$���� �'�'�)�*=�*=�*?�*F�*F�F�F�Fr+c���tjgd�gd��tj�}tj|dd��tj|�}|jdk(sJ�y)Nr�r�r�T)r>�transparent�RGBA)r0rKr!r"r#rr�rRr�s  r)�test_webp_alphar	sJ���H�H�Y�	�"�
�*�*�,�C��K�K��F��5�	���C��B�
�7�7�f���r+c��tj�\}}|jdgdg�jt	ddg��tjt�5|jj�ddd�y#1swYyxYw)Nr)rr)rHr)
r0r1�scatter�	set_pathsrr�r��	TypeErrorr�r�)r'r7s  r)�(test_draw_path_collection_error_handlingr	sg���l�l�n�G�C���J�J��s�Q�C��"�"�4���(8�#9�:�	���y�	!���
�
�������s�B�Bc��d}d}d|z}d|z}tjd||�}tj|�|z}d|ddd�<ttj||f�j
�}d|_t|||�}|j�}|jd�|jd�|jd	�tjtd
��5|j||t!��ddd�|jd�tjtd��5|j||t!�d
�ddd�t#ddi�5tjtd��5|j||t!��ddd�ddd�t#ddi�5tjtd��5|j||t!��ddd�ddd�t#ddi�5tjtd��5|j||t!��ddd�ddd�d|_tjtd��5|j||t!��ddd�y#1swY���xYw#1swY��]xYw#1swY��xYw#1swY��"xYw#1swY��xYw#1swY��xYw#1swY��xYw#1swY��xYw#1swYyxYw)NrGi�r-�rrHrr��/zcan not split hatched path)�matchzcan not split filled path)rrrr�z
Please seti@Bz
Please reducei�_Fzshould_simplify is False)r?�linspacerJr�vstack�T�simplify_thresholdr�new_gc�
set_linewidth�set_foreground�	set_hatchr�r��
OverflowError�	draw_pathrr�should_simplify)	�NrjrZ�hrWr[�path�ra�gcs	         r)�test_chunksize_failsrs���	�A�

�C�	�#��A�	�#��A�	���A�q�!��A�
����
�Q��A�
�A�c��c�F���	�	�1�a�&�!�#�#�$�D��D��
�Q��3�	�B�	����B����Q�����c���L�L���	���}�,H�	I�4�
���R��0�2�3�4��L�L���	���}�,G�	H�?�
���R��0�2�I�>�?�
�)�1�-�	.�8�
�]�]�=��
=�	8��L�L��T�#4�#6�7�	8�8�

�)�9�5�	6�8�
�]�]�=��
@�	8��L�L��T�#4�#6�7�	8�8�

�)�6�2�	3�8�
�]�]�=��
@�	8��L�L��T�#4�#6�7�	8�8�!�D��	���}�,F�	G�4�
���R��0�2�3�4�4�/4�4��?�?��
	8�	8��8�8��	8�	8��8�8��	8�	8��8�8��
4�4�s��"J�2J*�$K�J7�K�9K�K�1K�K5�*K)�K5�8L�J'�*J4�7K	�<K�K�K	�K�K&�)K2	�.K5�5K>�L
c���tj�}|jd��jgd�gd�t	j
d��g��|jj�y)N�3d)�
projectionr�r�)�	linewidth)�path_effects)r0r��add_subplotrr�Stroker�r�)r's r)�test_non_tuple_rgbafacer&MsO��

�*�*�,�C��O�O�t�O�$�,�,��9�K�,>�,>��,K�+L�-�N��J�J�O�O�r+)/r!�numpyr?�
numpy.testingr�PILrrr��
matplotlibrrrr0r	r�r
r�matplotlib.backends.backend_aggr�matplotlib.figurer
�matplotlib.imager�matplotlib.pathr�matplotlib.testing.decoratorsr�matplotlib.transformsrr*r9rErMr�r�r��mark�backendr�r�r�rrr	rr&rgr+r)�<module>r3s���	��3��
���8�$�#� �:�3�)�>�	#�$��#�$�$�7�n �8�n �b�������U��(��(�)�4�
G���24�jr+

Youez - 2016 - github.com/yon3zu
LinuXploit