| Server IP : 35.80.110.71 / Your IP : 216.73.217.120 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 : |
�
G8�c� � � � d dl Z d dlZd dlmZ d dlmZ d� Zd� Zd� Z e j j ddd id
fddd
�dfdd idfdd idfdd gg d�d�dfdd gg d�d�dff� d� � Ze j j ddd idfddgd d�dfd d id!fd did"fd#d d$�d%fd&d d$�d'fd(d d$�d)fd*d d+dgdgd,�d-fd*d d+dgdgd.�d/ff � d0� � Z
d1� Z ed2g�3� d4� � Zy)5� N)�Sankey)�check_figures_equalc �8 � t � } | j � y )N)r �add)�sankeys �>/usr/lib/python3/dist-packages/matplotlib/tests/test_sankey.py�test_sankeyr s � �
�X�F�
�J�J�L� c � � t dgdgdg�� } | j d j d j � dk( sJ �y )N� �?�First���)�flows�labels�orientationsr z
First
0.25�r �diagrams�texts�get_text)�ss r �
test_labelr s@ � ��d�V�W�I�R�D�A�A��:�:�a�=���q�!�*�*�,�
�=�=�=r
c � � d� } t dgdgdg| �� }|j d j d j � dk( sJ �y )Nc �
� | d�S )Nz.3f� )�values r �show_three_decimal_placesz=test_format_using_callable.<locals>.show_three_decimal_places s � ����r
r r
r )r r r �formatr zFirst
0.250r )r r s r �test_format_using_callabler sN � �� �d�V�W�I�R�D�/� 1�A�
�:�:�a�=���q�!�*�*�,��>�>�>r
zkwargs, msg�gapr z'gap' is negative� � )r �radiusz'radius' is greater than 'gap'�
head_anglez'head_angle' is negative� tolerancez'tolerance' is negative)r r r �r r z/The shapes of 'flows' \(2,\) and 'orientations')�a�b�c)r r z)The shapes of 'flows' \(2,\) and 'labels'c �z � t j t |�� 5 t di | �� d d d � y # 1 sw Y y xY w)N��matchr )�pytest�raises�
ValueErrorr )�kwargs�msgs r �test_sankey_errorsr1 s2 � �
���z�� -� ������ � �s �1�:�trunklengthz'trunklength' is negative皙�����?g333333�?)r �priorzThe scaled sum of the connectedr4 z*The index of the prior diagram is negativez#The index of the prior diagram is 1)r r )�connectr4 zAt least one of the connection)r! r z"The connection index to the source)r � z The connection index to this dia)r r 皙����ɿ)r5 r4 r r zThe value of orientations)r5 r4 r �pathlengthszThe lengths of 'flows'c �� � t � }t j t |�� 5 |j ddg�� |j di | �� d d d � y # 1 sw Y y xY w)Nr* r3 r7 )r r )r r, r- r. r )r/ r0 r s r �test_sankey_add_errorsr: . sQ � � �X�F� ���z�� -� ��
�
�#�t��
�%���
�
��V��� � �s �'A�Ac �< � t g d�dgdgd�� } | j � }t j t j t j
d� |d j � � sJ �|d j g d�k( sJ �t |d j D �cg c] }|j � dd dk( �� c}� sJ �t |d j D �cg c] }|j � d d dk( �� c}� sJ �|d j j � d
k( sJ �t j t j
d� |d j � sJ �t g d�dgdgd�� } | j � }t j t j t j
d� |d j � � sJ �|d j g d
�k( sJ �t j t j
d� |d j � sJ �y c c}w c c}w )N)r � п� �?� ��Foor �Bar)r r r �unitr )r r6 r r6 r6 ���� )�g ��g=�äg �?g6� �t)迩g �g�ՁA�ڿ�g �?g�qXu���)r r<