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

G8�c:���ddlZddlmZddlZddlZddlmZddl	m
Z
mZe
dgdd��d	��Ze
d
gddd��d
��Z
e
dg�d��Zd�Ze�d��Ze�d��Ze�d��Ze
dgd��d��Ze
dgd��d��Ze
dgd��d��Ze
dgd��d��Ze
dgd��d��Ze
dgd��d ��Ze
d!gd��d"��Ze
d#gd��d$��Zed%g�&�d'��Zed%g�&�d(��Zd)�Zd*�Zd+�Zd,�Z d-�Z!ed%g�&�d.��Z"ed%g�&�d/��Z#d0�Z$d1�Z%d2�Z&d3�Z'ed%g�&�d4��Z(d5�Z)d6�Z*d7�Z+y)8�N)�assert_allclose)�pyplot)�image_comparison�check_figures_equal�
polar_axes�defaultg�~j�t��?)�style�tolc
��tjddd�}dtjz|z}tj�}|jd��}|j
||dd�	�\}|j
d
ddd
�	�\}d}||||}}|j
|g|gd�|jd||fddtdd��dd��|jdddd��y)N���?���MbP?�@T��polarz#ee8d18�)�color�lw�rr�r�z#0000ffr� �oza polar annotation)皙�����?rzfigure fraction�blackr��	facecolor�shrink�left�baseline)�xy�xytext�
textcoords�
arrowprops�horizontalalignment�verticalalignment�x�out)�axis�tick1On�tick2On�	direction)
�np�arange�pi�plt�figure�add_subplot�plot�annotate�dict�tick_params)�r�theta�fig�ax�line�ind�thisr�	thisthetas        �=/usr/lib/python3/dist-packages/matplotlib/tests/test_polar.py�test_polar_annotationsr@
s���	�	�	�#�s�E�"�A�������!�E�

�*�*�,�C�	���t��	$�B��G�G�E�1�I�!�G�4�E�D��G�G�F�F�)��G�:�E�D�

�C���v�u�S�z�9�E��G�G�Y�K�%��#�&��K�K�$��u�%�#�,��'�$�?�$*�",�
���N�N��T�4�5�N�I��polar_coordsT)r	�remove_textr
c���tjjddddd��}tj�}|jd��}|j
|�|j|j�|jd	tjd
zdftjdzd
fddtdd��ddd��	|jdd�|jdd�y)Nr�
�r7��?)r�alpha�equal)�aspectzthe top�@�$@rg4@rrrrrr T)r!r"�xycoordsr#r$r%r&�clip_oni��)�mpl�patches�Ellipser0r1r2�
add_artist�set_clip_box�bboxr4r-r/r5�set_xlim�set_ylim)�elr9r:s   r?�test_polar_coord_annotationsrX,s���

���	�	�V�R��s�#�	�	F�B�

�*�*�,�C�	�����	(�B��M�M�"���O�O�B�G�G���K�K�	��E�E�"�H�c�?����a���~� �"��'�$�?�$*�",���	��K�K��R���K�K��R�rAzpolar_alignment.pngc�|�tjddd�}gd�}tj�}gd�}|j	|dd��}|j|�|j	|dd	��}|jjd
�td�D]'}|j|j|||dd
���)y)Nrih�Z)r皙�����?皙�����?g333333�?皙�����?r�皙�����?r_r]r]T�
horizontal)r�label�verticalF�r�top)�angler%r&)r-r.r0r1�add_axes�set_thetagrids�patch�set_visible�range�axes�
set_rgrids)�angles�grid_valuesr9�rectr`rb�is       r?�test_polar_alignmentrqIs����Y�Y�q�#�r�
"�F�,�K�

�*�*�,�C��D����d�$�l��C�J����f�%��|�|�D��J�|�?�H��N�N���u�%�
�1�X�A����������v�a�y� &�%�	�	A�ArAc���tj�}tjddgddg�tjddgddg�t|j�dk(sJd	��y)
Nrrcr_r[r�g333333�?r\z!More than one polar axes created.)r0r1r�lenrk)r9s r?�test_polar_twiceru^sU��

�*�*�,�C��I�I�q�!�f�r�2�h���I�I�q�!�f�r�2�h���s�x�x�=�A��B�B�B�rAc��|jd��}|jtjddg�ddg�|jtjddg�ddg�|jd��}|jtjdd	g�ddg�|jtjdd
g�ddg�y)Nr��
projection�iM���r[r_rc����if)r2r3r-�deg2rad��fig_test�fig_refr:s   r?�test_polar_wrapr�es���	�	�	��	�	1�B��G�G�B�J�J��T�{�#�c�3�Z�0��G�G�B�J�J��2�w��#�s��,�	�	�	��	�	0�B��G�G�B�J�J��S�z�"�S�#�J�/��G�G�B�J�J��3�x� �3��*�-rAc��ddlmcm}|j�gd�}gd�}t	j
|j�t	j|D�cgc]}||jz��c}|�|jd��}|jtj|�|�|jd��ycc}w)Nr�g>@g�F@gN@��V@�r
rK�@rrrw�deg)�xlabel)�matplotlib.testing.jpl_units�testing�	jpl_units�registerr0r1�numberrr�r2r3r-r|�set)r~r�units�xs�ysr'r:s       r?�test_polar_units_1r�os���0�0�	�N�N��	!�B�	�B��J�J�x�����I�I�b�)��q�5�9�9�}�)�2�.�	�	�	��	�	0�B��G�G�B�J�J�r�N�B���F�F�%�F���	*s�B<c���ddlmcm}|j�gd�}|D�cgc]}||jz��}}gd�}|D�cgc]}||j
z��}}t
j|j�t
j||dd��tt
j�jj�|j�sJ�|jd��}	|	j!t#j$|�|�|	jj't(j*j-d	j.��|	j1dd�
�ycc}wcc}w)Nrr�r��rad�km)�
thetaunits�runitsrrwz{:.12})r��ylabel)r�r�r�r�r�r�r0r1r�r�
isinstance�gca�xaxis�get_major_formatter�UnitDblFormatterr2r3r-r|�set_major_formatterrO�ticker�
FuncFormatter�formatr�)
r~rr�r�r'�xs_degr��y�ys_kmr:s
          r?�test_polar_units_2r�~s��0�0�	�N�N��	!�B�%'�
(��a�%�)�)�m�
(�F�
(�	�B�#%�&�a�Q����\�&�E�&��J�J�x�����I�I�f�e��d�;��c�g�g�i�o�o�9�9�;��,�,�.�.�.�
�	�	��	�	0�B��G�G�B�J�J�r�N�B���H�H� � ����!9�!9�(�/�/�!J�K��F�F�%��F�%��)��&s�E!�E&�
polar_rmin)r	c��tjddd�}dtjz|z}tj�}|jgd�d��}|j
||�|jd�|jd	�y)
Nrr��{�G�z�?rcr^TrrKrG�	r-r.r/r0r1rfr3�set_rmax�set_rmin�r7r8r9r:s    r?�test_polar_rminr��si��
�	�	�!�S�$��A�
�b�e�e�G�A�I�E�

�*�*�,�C�	���*�$��	7�B��G�G�E�1���K�K����K�K��rA�polar_negative_rminc��tjddd�}dtjz|z}tj�}|jgd�d��}|j
||�|jd�|jd�y)Ng�rr�rcr^Trr�r�s    r?�test_polar_negative_rminr��si��
�	�	�$��T�"�A�
�b�e�e�G�A�I�E�

�*�*�,�C�	���*�$��	7�B��G�G�E�1���K�K����K�K��rA�
polar_roriginc�:�tjddd�}dtjz|z}tj�}|jgd�d��}|j
||�|jd�|jd	�|jd
�y)Nrr�r�rcr^TrrKrGr)
r-r.r/r0r1rfr3r�r��set_roriginr�s    r?�test_polar_roriginr��su��
�	�	�!�S�$��A�
�b�e�e�G�A�I�E�

�*�*�,�C�	���*�$��	7�B��G�G�E�1���K�K����K�K����N�N�3�rAzpolar_invertedylim.pngc�z�tj�}|jgd�d��}|jdd�y)Nr^Trrcr)r0r1rfrV�r9r:s  r?�test_polar_invertedylimr��s.��

�*�*�,�C�	���*�$��	7�B��K�K��1�rAzpolar_invertedylim_rorigin.pngc��tj�}|jgd�d��}|jj	d�|jddgddgd��|j
d�|jd�y)	Nr^Trrrc�none)�cr)r0r1rf�yaxis�set_invertedr3�marginsr�r�s  r?�test_polar_invertedylim_roriginr��se��

�*�*�,�C�	���*�$��	7�B��H�H���$���G�G�Q��F�Q��F�f�G�%��J�J�q�M��N�N�1�rA�polar_theta_positionc��tjddd�}dtjz|z}tj�}|jgd�d��}|j
||�|jdd	�|jd
�y)Nrr�r�rcr^Tr�NW��	clockwise)	r-r.r/r0r1rfr3�set_theta_zero_location�set_theta_directionr�s    r?�test_polar_theta_positionr��so��
�	�	�!�S�$��A�
�b�e�e�G�A�I�E�

�*�*�,�C�	���*�$��	7�B��G�G�E�1�����t�R�(����;�'rA�polar_rlabel_positionc��tj�}|jd��}|jd�|j	d��y)Nrrwi;�auto)�rotation)r0r1r2�set_rlabel_positionr6r�s  r?�test_polar_rlabel_positionr��s9��

�*�*�,�C�	���G��	,�B����3���N�N�F�N�#rA�polar_theta_wedgec�D�tjddd�}dtjz|z}tjddd�}tjddd�}d	}tjt|�t|�d
did�
�\}}t
|�D�]\}}t
|�D]�\}	}
|||	f}|j||�||
kr#|j|�|j|
�n3|j|
�|j|�|jd�|jdd||t|�zd��|jjdd��|jj�j j#gd�������y)Nrr�r�rcg.@g�v@r�gI@)r(�in�inoutrT)��)�
subplot_kw�figsizer�r�)r*r+r,r�)�label2Onr�)rrcg@�rE)�steps)r-r.r/r0�subplotsrt�	enumerater3�set_thetamin�set_thetamaxr�r6r��set_tick_paramsr��get_major_locator�base�
set_params)r7r8�
theta_mins�
theta_maxs�
DIRECTIONSr9�axsrp�start�j�endr:s            r?�test_polar_theta_limitsr��su��
�	�	�!�S�$��A�
�b�e�e�G�A�I�E����4���-�J����4���-�J�'�J��|�|�C�
�O�S��_�(/���$*�,�H�C���j�)�*���5��
�+�	*�F�A�s��Q��T��B��G�G�E�1���s�{�����&�����$�����$�����&��&�&�{�3��N�N�4��%/��C�
�O�0C�%D�$*�
�
,�
�H�H�$�$�d�V�$�D��H�H�&�&�(�-�-�8�8�(�
9�
*�	*�*rA�png)�
extensionsc���|jddi��}|jd��|jd��|jddi��}|jd�|jd�y)	NrT�r�rE)rdrG��bottomrL�r��set_rlimr�r�r}s   r?�test_polar_rlimr�sc��	�	�	�w��o�	�	6�B��K�K�B�K���K�K�r�K��	�	�	�g�t�_�	�	5�B��K�K����K�K��OrAc��|jddi��}|jddg��|jddi��}|jd�|jd�y)NrTr�rGrEr�rLr�r}s   r?�test_polar_rlim_bottomr�sY��	�	�	�w��o�	�	6�B��K�K��B�x�K� �	�	�	�g�t�_�	�	5�B��K�K����K�K��OrAc���tj�jd��}|jt	j
d�t	j
d�dz�|j
�ddk(sJ�y)NrrwrEr�r)r0r1r2r3r-r.�get_ylim�r:s r?�test_polar_rlim_zeror�sW��	����	!�	!�W�	!�	5�B��G�G�B�I�I�b�M�2�9�9�R�=�3�.�/�
�;�;�=���q� � � rAc�r�tjd��tj�}|j�dk(r|j	�dk(sJ�tj
d�tj�tj�}|j�dk(r|j	�dk(sJ�y)Nrrwrr�all)r0�subplotr��get_rmin�get_rmax�closerr�s r?�test_polar_no_datar�s~���K�K�7�#�	����B�
�;�;�=�A��"�+�+�-�1�"4�4�4��I�I�e���I�I�K�	����B�
�;�;�=�A��"�+�+�-�1�"4�4�4�"4rAc���tj�jd��}tjt
�5|j
d�ddd�y#1swYyxYw)Nrrw�datalim)r0r1r2�pytest�raises�
ValueError�set_adjustabler�s r?�!test_polar_not_datalim_adjustabler&sJ��	����	!�	!�W�	!�	5�B�	���z�	"�%�
���)�$�%�%�%�s�A�A"c���tj�}|jd��}|jd��tj|j
j
�d��|jj�|jjdjj�dk(sJ�|j
jdjj�dk(sJ�y)NTrr[)rHF)�visibler)
r0r1r2�grid�setpr��get_ticklabels�canvas�drawr��
majorTicks�gridline�	get_alphar�s  r?�test_polar_gridlinesr,s���

�*�*�,�C�	���t��	$�B��G�G�#�G���H�H�R�X�X�
$�
$�
&��6��J�J�O�O��
�8�8���q�!�*�*�4�4�6�"�<�<�<�
�8�8���q�!�*�*�4�4�6�"�<�<�<rAc���tjddi��\}}|jj�|j	|jj��}t
|jgd�d��y)Nrxrr�)g��y��Z@g,Ԛ�G=@g_)�Gހ@g�R�!�+|@r)�rtol)r0r�r	r
�
get_tightbbox�get_rendererr�extents)r9r:�bbs   r?�test_get_tightbbox_polarr8sY���l�l�|�W�&=�>�G�C���J�J�O�O��	�	�	�#�*�*�1�1�3�	4�B��
�
�
�<�5�JrAc���|jdd��jdgdgdtjzdd�	�}|jd
d��jdgdgdtjzdd�	�}|jdd��jdgdgdtjzdd�	�}|jd
d��jdgdgd
tjzdd�	�}y)N�yrrwrrrr�F)�	edgecolor�antialiased�z���rcrz)r2�barr-r/)r~r�p1�p2�p3�p4s      r?�)test_polar_interpolation_steps_constant_rr!@s����
�
�s�w�
�
7��3��s�Q�C��2�5�5��F��3�F��
�
�
�s�w�
�
7��3��s�Q�C��B�E�E��V��3�G��
�
�
�c�g�
�
6��3��s�Q�C��2�5�5��F��3�F��
�
�
�c�g�
�
6��3��s�Q�C��B�E�E��V��3�G�rAc�Z�|jd��jdtjdzgddg�\}d|j	�_|jd��jtjdtjdzd�tjddd��y)Nrrwrrcr�d�e)r2r3r-r/�get_path�_interpolation_steps�linspace)r~r�ls   r?�)test_polar_interpolation_steps_variable_rr)Ns���	�	�	��	�	1�	6�	6��2�5�5��7�|�a��V�	L�B�A�(+�A�J�J�L�%����7��+�0�0�
���A�r�u�u�Q�w��$�b�k�k�!�Q��&<�>rAc���tjd��}|jddtjz�|jdd��tjtd�	�5|jdd
tjz�ddd�tjtd�	�5|jdd��ddd�y#1swY�AxYw#1swYyxYw)Nrrwrrcri�)�thetamin�thetamaxz+angle range must be less than a full circle)�matchri�)r0r��set_thetalimr-r/r�rrr�s r?�test_thetalim_valid_invalidr/Vs���	����	(�B��O�O�A�q�2�5�5�y�!��O�O�S�3�O�/�	���z�J�
L�&�
����1�r�u�u�9�%�&�
���z�J�
L�4�
����s��3�4�4�&�&��4�4�s�($C�/C�C�C!c�z�tjd��}|jdd�tt	j
|j
�|j�f��dk(sJ�|jd�tt	j
|j
�|j�f��dk(sJ�y)Nrrwrrr)rcr)r0r�r.�tupler-�radians�get_thetamin�get_thetamaxr�s r?�test_thetalim_argsr5bs���	����	(�B��O�O�A�q������R�_�_�.����0A�B�C�D��N�N�N��O�O�F������R�_�_�.����0A�B�C�D��N�N�NrAc��tjdddi��\}}|j�D]"}|jdtj
��$|j�D]o}t	j|jj��j�}tjd�|vsJ�tjd�|vr�oJ�y)NzAAAABB.rxrr�rrZr#)r0�subplot_mosaic�valuesr.r-r/�degreesr��get_majorticklocs�tolistr��approx)r9r�r:�ticklocss    r?�test_default_thetalocatorr>js����!�!��|�W�5�7�H�C���j�j�l�"��
����2�5�5�!�"��j�j�l�2���:�:�b�h�h�8�8�:�;�B�B�D���}�}�R� �H�,�,�,��}�}�S�!��1�1�1�2rAc��tjd��}|jdtjdz�}|j�jdkDsJ�y)Nrrwrrsr)r0r��axvspanr-r/r%r&)r:�spans  r?�test_axvspanrBxsB��	����	(�B�
�:�:�a����q��!�D��=�=�?�/�/�!�3�3�3rAc���|jdddddi��}dD]}|j|j��!|jdddddi��}dD]}|j|j��!y)NrcTrxr)�sharexr�)rrr)�shareyr�)r��flat�remove)rr~r�rps    r?�test_remove_shared_polarrH~s���
�
�
�	�1�T�|�W�&=��?�C�
������������
�
�
�	�1�T�|�W�&=��?�C�
�����������rAc�F�tjddddidd��\}}|jj�|djj
dj
�sJ�|djj
dj
�sJ�tjdddidd��\}}|jj�|d	jj
dj
�sJ�|d	jj
dj
�sJ�y)
NrcrxrT)r�rDrErrzab
cd�b)	r0r�r	r
r�r�get_visibler�r7)r9r�s  r?�"test_shared_polar_keeps_ticklabelsrL�s����|�|�	�1�,��0��d�L�H�C���J�J�O�O���t�9�?�?�%�%�a�(�4�4�6�6�6��t�9�?�?�%�%�a�(�4�4�6�6�6��!�!��l�G�4�T�$�P�H�C���J�J�O�O���s�8�>�>�$�$�Q�'�3�3�5�5�5��s�8�>�>�$�$�Q�'�3�3�5�5�5rAc���tjd��}|jdd�|jd�|j	ddg�|j�dk(sJ�y)	NrrwrrrGr_r[)rr[)r0r�r@�axvliner3r�r�s r?�(test_axvline_axvspan_do_not_modify_rlimsrO�sM��	����	(�B��J�J�q�!���J�J�r�N��G�G�R��H��
�;�;�=�G�#�#�#rAc���tjd��}|jdd�dk(sJ�|jdd�dk(sJ�|jdd�dk(sJ�|jdd�d	k(sJ�|jdd�d
k(sJ�|jdd�dk(sJ�|jdd�d
k(sJ�|jdd�dk(sJ�|jdd�dk(sJ�y)Nrrwruθ=0π (0°), r=0.000r_uθ=0.00π (0°), r=0.100ruθ=0.000π (0.0°), r=1.000uθ=0.3π (57°), r=0.000uθ=0.32π (57°), r=0.100uθ=0.318π (57.3°), r=1.000rcuθ=0.6π (115°), r=0.000uθ=0.64π (115°), r=0.100uθ=0.637π (114.6°), r=1.000)r0r��format_coordr�s r?�test_cursor_precisionrR�s���	����	(�B�
�?�?�1�a� �$;�;�;�;�
�?�?�1�b�!�%?�?�?�?�
�?�?�1�a� �$A�A�A�A�
�?�?�1�a� �$>�>�>�>�
�?�?�1�b�!�%@�@�@�@�
�?�?�1�a� �$B�B�B�B�
�?�?�1�a� �$?�?�?�?�
�?�?�1�b�!�%A�A�A�A�
�?�?�1�a� �$C�C�C�CrA),�numpyr-�
numpy.testingrr��
matplotlibrOrr0�matplotlib.testing.decoratorsrrr@rXrqrur�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrr!r)r/r5r>rBrHrLrOrR�rAr?�<module>rXs����)�
��$�O��<�.�	�u�=�J�>�J�B�>�"�)�������6�(�)�*�A�+�A�(C���.��.��������&��&�(�<�.�	�2��3���(�)��;��<���?�#�9�5�	�6�	��+�,�I�>��?���3�4�I�F��G���)�*�)�<�(�=�(��*�+�9�=�$�>�$��&�'�y�9�*�:�*�@���(��)�����(��)��!�5�%�	=�J����(�
I�)�
I����(�>�)�>�	4�O�2�4����(��)��
6�$�DrA

Youez - 2016 - github.com/yon3zu
LinuXploit