403Webshell
Server IP : 35.80.110.71  /  Your IP : 216.73.216.52
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_tightlayout.cpython-312.pyc
�

G8�cV0��|�ddlZddlZddlmZddlZddlZddlm	Z	ddl
mZddl
mZmZddlmZd3d�Ze	dgd�	�d
��Ze	dg�d��Ze	d
g�d��Ze	dgdd��d��Ze	dg�d��Ze	dg�d��Ze	dgd�	�d��Ze	dg�d��Ze	dg�d��Zd�Zd4d�Ze	d d!g�d"��Zd#�Zej@jCd$d%d&g�d'��Z"d(�Z#d)�Z$d*�Z%d+�Z&d,�Z'ej@jQd-�d.��Z)d/�Z*d0�Z+d1�Z,d2�Z-y)5�N)�assert_array_equal)�image_comparison)�AnchoredOffsetbox�DrawingArea)�	Rectanglec��|jddg�|jd��|jd|��|jd|��|j	d|��y)	N�����nbins�x-label��fontsize�y-label�Title)�plot�locator_params�
set_xlabel�
set_ylabel�	set_title)�axrs  �C/usr/lib/python3/dist-packages/matplotlib/tests/test_tightlayout.py�example_plotrsR���G�G�Q��F�O����A����M�M�)�h�M�/��M�M�)�h�M�/��L�L��8�L�,��
tight_layout1gffffff�?)�tolc�t�tj�\}}t|d��tj�y)z'Test tight_layout for a single subplot.�rN��plt�subplotsr�tight_layout��figrs  r�test_tight_layout1r&s)���l�l�n�G�C����b�!����r�
tight_layout2c���tjdd��\}\\}}\}}t|�t|�t|�t|�tj�y)�(Test tight_layout for multiple subplots.r
)�nrows�ncolsNr )r%�ax1�ax2�ax3�ax4s     r�test_tight_layout2r0sR��%(�L�L�q��$B�!�C�	!�*�3��j�s�C����������������r�
tight_layout3c���tjd�}tjd�}tjd�}t|�t|�t|�tj�y)r)�����zN)r!�subplotrr#)r,r-r.s   r�test_tight_layout3r7)sR���+�+�c�
�C�

�+�+�c�
�C�

�+�+�c�
�C�������������r�
tight_layout4)z2.5.5z2.6.1���Q��?)�freetype_versionrc�B�tjdd�}tjddd��}tjdddd��}tjddd�	�}t|�t|�t|�t|�tj�y
)z#Test tight_layout for subplot2grid.)rr�rr)rr	r
)�colspan)r	r�r=�rowspan)r	r
)r?N)r!�subplot2gridrr#)r,r-r.r/s    r�test_tight_layout4rA5s����
�
�6�6�
*�C�

�
�
�6�6�1�
5�C�

�
�
�6�6�1�a�
@�C�

�
�
�6�6�1�
5�C����������������r�
tight_layout5c���tj�}tjd�j	d�}|j|d��tj�y)zTest tight_layout for image.�d��
rF�none)�
interpolationN)r!r6�np�arange�reshape�imshowr#)r�arrs  r�test_tight_layout5rNDsC��

����B�
�)�)�C�.�
 �
 ��
*�C��I�I�c��I�(����r�
tight_layout6c
��tj�5tjdt�t	j
�}tjjdd�}|j|d�}|j|d�}t|�t|�|j|gd���tjjdd�}|D]@}|j|�}t|�|jd�|jd��Bjd	d
��|j|gd�d
��t|j|j�}t!|j"|j"�}|j|dd||j"z
zdd|j|z
z
g��|j|dd||j"z
zdd|j|z
z
gd
��ddd�y#1swYyxYw)zTest tight_layout for gridspec.�ignorer
r	r)rr��?r	��rectr�r�r)rRrr	r	g�������?)rT�h_padNrR)�warnings�catch_warnings�simplefilter�UserWarningr!�figure�mpl�gridspec�GridSpec�add_subplotrr#rr�min�top�max�bottom)	r%�gs1r,r-�gs2�ssrrbrds	         r�test_tight_layout6rhMs���
�	 �	 �	"� %����h��4��j�j�l���l�l�#�#�A�q�)���o�o�c�!�f�%���o�o�c�!�f�%���S���S������>��2��l�l�#�#�A�q�)���	�B�����$�B�����L�L����M�M�"��		�	�
�
�i�"�
�-�����>���>��#�'�'�3�7�7�#���S�Z�Z����,������D�!�v�c�j�j�/@�*A�$'��c�g�g�c�k�):�$<��	=�����C��f�S�Z�Z�.?�)@�$(�!�s�w�w�s�{�*;�$=�#�	�	%�= %� %� %�s�GG=�=H�
tight_layout7c�D�d}tj�\}}|jddg�|jd��|j	d|��|jd|��|j
d	d
|��|j
dd
|��tj�y)Nrr	r
rrrrrz
Left Title�left)�locrzRight Title�right)r!r"rrrrrr#)rr%rs   r�test_tight_layout7rnws����H��l�l�n�G�C���G�G�Q��F�O����A����M�M�)�h�M�/��M�M�)�h�M�/��L�L��6�H�L�=��L�L��G�h�L�?����r�
tight_layout8c��tj�}|jdd��|j�}t	|d��|j�y)�#Test automatic use of tight_layout.�tight皙�����?)�layout�padrrN)r!r\�set_layout_enginer`r�draw_without_renderingr$s  r�test_tight_layout8rx�sD���*�*�,�C�����c��2�	���	�B���b�!���� r�
tight_layout9c��tjdd�\}}|ddjd�tj�y)Nr
r	F)r!r"�set_visibler#)�f�axarrs  r�test_tight_layout9r~�s:���|�|�A�q�!�H�A�u�	�!�H�Q�K���E�"����rc��tj�}|jd�}|jj	ddd��|j
j	ddd��|jj	ddddd�	�|j
j	ddddd�	�|jj
d
gd��|j
j
d
gd��|jd�}|jj	d
dd��|j
j	d
dd��|jd�}|jj	ddd��|j
j	ddd��|jd�}|jj	ddd��|j
j	ddd��tj�ddgddggddgddggddgddggddgddggg}t|j�D]D\}}ttj|j�j�d�||��Fy)rqr3�out�r)�tickdir�length�width� T�minor)r�r�r��tick1On�whichr)r����inr4�inout��g����K�?g��C�l�?g��ʡE��?gB`��"��?g�I+��?g/�$��?g�Q���?gm����?N)r!r\r`�xaxis�set_tick_params�yaxis�	set_ticksr#�	enumerate�axesrrI�round�get_position�
get_points)r%r�ans�nns    r�test_outward_ticksr��s$��

�*�*�,�C�	����	�B��H�H���U�2�Q��?��H�H���U�2�Q��?��H�H����b��4�w��H��H�H����b��4�w��H��H�H����s�$��'��H�H����s�$��'�	����	�B��H�H���T�"�A��>��H�H���T�"�A��>�	����	�B��H�H���W�R�q��A��H�H���W�R�q��A�	����	�B��H�H���U�2�Q��?��H�H���U�2�Q��?������E�N�U�E�N�+�
�E�N�U�E�N�+�
�E�N�U�E�N�+�
�E�N�U�E�N�+�-�C��C�H�H�%�$���B��2�8�8�B�O�O�$5�$@�$@�$B�A�F��r�7�	$�$rc
�"�|d|z}}||f|df||f|dfd|f||fd|f||fd|fg	}|D]^}t||�}td|||ddd��}	|j|	�td|d	d||jd	�
�}
|j|
��`
S)z&
    Surround ax with OffsetBoxes
    r	rRr<�NonerF)r��height�	facecolor�	edgecolor�	linewidth�antialiased�centerg)rl�childru�frameon�bbox_to_anchor�bbox_transform�	borderpad)rr�
add_artistr�	transAxes)r�size�margin�color�m�mp�
anchor_points�point�da�
background�anchored_boxs           r�add_offsetboxesr��s���
�A�f�H�r�A��b�1�"�X���B�x�1�"�b���"�X��B�x�"�b���1�"�X��Q�B�x�"�q�b��3�M��$��
��t�
$���v�T�&*�).�)/�)*�+0�2�
�	�
�
�j�!�(����� ��<�<����	�
�
�l�#�%$�&�r�tight_layout_offsetboxes1�tight_layout_offsetboxes2c�6������dx��gd��ddgx�������fd�}|�}tj�|�}|�dz
d��D]9}|j�D]$}t|t�s�|jd��&�;tj�y)Nr
)�red�blue�green�yellowrr	c���tj���\}}|j}t|��D]'\}}|j	��|��t|d|���)|S)N)r��)r!r"�flat�ziprr�)	�_�axsrr��colors�cols�rows�x�ys	    �����r�	_subplotsz0test_tight_layout_offsetboxes.<locals>._subplots�s_������d�D�)���3��h�h���S�&�)�	1�I�B���G�G�A�q��G�&��B��%�0�	1��
rF)r!r#�get_children�
isinstancerr{)	r�r�rr�r�r�r�r�r�s	    @@@@@r�test_tight_layout_offsetboxesr��s�����O�D�4�
/�F�
��F�N�A�����+�C������+�C��4��6�<�4�<� �)���_�_�&�	)�E��%�!2�3��!�!�%�(�	)�)�
���rc�L�tj�}|j�y)zETest that tight layout doesn't cause an error when there are no axes.N)r!�gcfr#)r%s r�test_empty_layoutr��s��

�'�'�)�C����r�label�xlabel�ylabelc�^�tjd��\}}|jdi|di��y)z8Test that no warning emitted when xlabel/ylabel too big.�rr
��figsize�daaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaN�)r!r"�set)r�r%rs   r�test_verybig_decoratorsr�s,���l�l�6�*�G�C��
�B�F�F� �e�Y�
� rc��tjddd��\}}|djd�|djd�y)	z+Test that doesn't warn when xlabel too big.r	r
r�r�r�aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa�bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbN)r!r"r�r%r�s  r�test_big_decorators_horizontalr��<���|�|�A�q�&�1�H�C����F���h����F���h�rc��tjddd��\}}|djd�|djd�y)	z+Test that doesn't warn when ylabel too big.r
r	r�r�r�aaaaaaaaaaaaaaaaaaaa�bbbbbbbbbbbbbbbbbbbbN)r!r"rr�s  r�test_big_decorators_verticalr�r�rc���tjdd�tjdddd��tjt�5tj
�ddd�y#1swYyxYw)N)��r<)r�r�)rrrr�r>)r!r@�pytest�warnsr[r#r�rr�test_badsubplotgridr�sS�����V�V�$����V�V�Q��:�	���k�	"���������s�	A'�'A0c�4�tjd��\}}|jddg�|jddg�|j	dddd�	�|j�}t
jt�5tj�|j�}|j|jk(sJ�	ddd�t
jt�5tjgd
���ddd�y#1swY�DxYw#1swYyxYw)NT�r#rr	zBIG LONG STRING)g�?r
)g%@g�?F)�xy�xytext�annotation_clip)rr皙�����?r�rS)r!r"�set_xlim�set_ylim�annotater�r�r�r[r#r�)r%r�p1�p2s    r�test_collapsedr�#s���
�l�l��-�G�C���K�K��A����K�K��A����K�K�!�i�� %��'�	���	�B�	���k�	"�$�����
�_�_�
���x�x�2�8�8�#�#�#�$�

���k�	"�0����.�/�0�0�$�$��
0�0�s�>AD� D�D�Dc��tjd��\}}|jd�}|jd�}|jj�|j
�j|j
�jkDsJ�y)NTr��foo�bar)	r!r"�suptitler�canvas�draw�get_window_extent�y0�y1)r%r�st�ts    r�
test_suptitler�8sj���l�l��-�G�C��	���e�	�B�
���U��A��J�J�O�O��
���!�$�$�q�':�':�'<�'?�'?�?�?�?r�pdfc���tjjj��fd�}|j	tjjd|�tj�\}}|j�y)Nc�~��t|tjjj�sJ��|g|��i|��y)N)r�r]�backends�backend_pdf�RendererPdf)�self�args�kwargs�unpatched_inits   �r�__init__z'test_non_agg_renderer.<locals>.__init__Ds7����$���� 8� 8� D� D�E�E�E��t�-�d�-�f�-rr	)r]�
backend_bases�RendererBaser	�setattrr!r"r#)�monkeypatch�recwarnr	r%rrs     @r�test_non_agg_rendererr@sZ����&�&�3�3�<�<�N�.�����)�)�6�6�
�H�M��l�l�n�G�C�����rc��tjdd�\}}|djddgddgddg��}|dj�}|j	|j
dz|jd|jg�}|j||��tjtd	�
�5|j�ddd�y#1swYyxYw)Nr	r
rr�)�cg{�G�zt?r9)�caxzThis figure includes Axes��match)
r!r"�scatterr��add_axes�x1r�r��colorbarr�r�r[r#)r%r��pts�ax_rectrs     r�test_manual_colorbarrOs������Q��"�I�C��
�q�'�/�/�1�a�&�1�a�&�Q��F�/�
3�C��1�g�"�"�$�G�

�,�,�	���e�	�W�Z�Z�����?��C��L�L��#�L��	���k�)D�	E���������s�.C�Cc��tjd�jd�}tjd��}|jdd��}|jdd	��}|jd
d��}|||fD]�}|j
d�|j|dd�d
f�\}|j|�}|j�sJ�|j�sJ�tddd|j��}|j|�|j|j�|j��|j�rJ�|j�s��J�y)NrDrE)�r
r���rectilinear)�
projection��	mollweide��polarFrr<rR)�	transform)rIrJrKr!r\r`�gridr�pcolor�_fully_clipped_to_axesrr��
set_clip_path�get_path�
get_transform)	rMr%r,r-r.r�hr�rTs	         r�test_clipped_to_axesr-\s*��
�)�)�C�.�
 �
 ��
*�C�

�*�*�V�
$�C�

�/�/�#�-�/�
8�C�

�/�/�#�+�/�
6�C�

�/�/�#�'�/�
2�C��C��o�.��
�����
�W�W�S��A��Y�
����I�I�c�N���'�'�)�)�)��'�'�)�)�)����c�R�\�\�B��	�����	����
�
���);�);�)=�>��+�+�-�-�-��+�+�-�-�-�.rc���tj�\}}tjtd��5|jddi�ddd�|j
�y#1swY�xYw)Nzwill be deprecatedrru�333333�?)r!r"r�r��PendingDeprecationWarning�set_tight_layoutrwr$s  r�test_tight_padsr2tsX���l�l�n�G�C��	���/�0�
2�,����e�T�]�+�,���� �,�,�s�A � A)c�Z�tjddi��\}}|j�y)Nrur/r�)r!r"rwr$s  r�test_tight_kwargsr4|s$���l�l���
�6�G�C����� r)rV)rFrs�black).rX�numpyrI�
numpy.testingrr��
matplotlibr]�matplotlib.testing.decoratorsr�matplotlib.pyplot�pyplotr!�matplotlib.offsetboxrr�matplotlib.patchesrrr&r0r7rArNrhrnrxr~r�r�r�r��mark�parametrizer�r�r�r�r�r��backendrrr-r2r4r�rr�<module>rAs�����,�
��:��?�(�-��?�#��-��.���?�#�$��%���?�#�$��%���?�#�6H���
��
��?�#�$��%���?�#�$�&%�%�&%�R�?�#��-�
�.�
��?�#�$�!�%�!��?�#�$��%��$�B�<�.�0K�L�M�$�N�$�N�������8�X�"6�7�!�8�!� � ��0�*@������U�����
�.�0!�!r

Youez - 2016 - github.com/yon3zu
LinuXploit