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/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

G8�c�~���dZddlZddlZddlZddlmZddlZddlZ	ddlm
Z
mZddlm
ZddlmZddlmZddlmZddlmZddlmZddlmZ ddl!m"Z#ejHe%�Z&dZ'ejPejR�Z*e*jW�Z,e*jZj]�D�cgc]
}e/|�d��c}Z0e,e0zD�cgc]}d|z��	c}Z1Gd�dejd�Z3Gd	�d
e3�Z4Gd�de3�Z5Gd
�d�Z6Gd�d�Z7Gd�dejd�Z8d�Z9Gd�de8�Z:Gd�de8�Z;ycc}wcc}w)z*
Classes for the ticks and x- and y-axis.
�N)�Number)�_api�cbook��grid_c���eZdZdZdddddddddddddddddddd��fd�
Zeejdd	d
��d���Zd
�Z	d�Z
ejdd��d��Zd�Zd�Z
d�Zd,�fd�	Zejd�d��Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd �Zd!�Zej6d"��Zd#�ZeZd$�Z�fd%�Z d&�Z!d'�Z"d(�Z#d)�Z$d*�Z%d+�Z&�xZ'S)-�Ticka�
    Abstract base class for the axis ticks, grid lines and labels.

    Ticks mark a position on an Axis. They contain two lines as markers and
    two labels; one each for the bottom and top positions (in case of an
    `.XAxis`) or for the left and right positions (in case of a `.YAxis`).

    Attributes
    ----------
    tick1line : `.Line2D`
        The left/bottom tick marker.
    tick2line : `.Line2D`
        The right/top tick marker.
    gridline : `.Line2D`
        The grid line associated with the label position.
    label1 : `.Text`
        The left/bottom tick label.
    label2 : `.Text`
        The right/top tick label.

    NTFr)�size�width�color�tickdir�pad�	labelsize�
labelcolor�zorder�gridOn�tick1On�tick2On�label1On�label2On�major�
labelrotation�
grid_color�grid_linestyle�grid_linewidth�
grid_alphac����t�|��|�X|r)tjddvrtjd}n-|s)tjddvrtjd}nd}|j	|j
�||_||_||_|j}|rdnd}|�tj|�d	|�d
�}||_
|�tj|�d	|�d�}||_|�tj|�d�}|�tj|�d	|�d
�}||_|	�tj|�d�}	|	dk(rtj|�d�}	|�tj|�d�}|j|�|
�:|rtjj dz}
ntjj }
|
|_|�tjd}|�tjd}|�tjd}|�(t%j&|�stjd}|j)�D��cic]\}}|dd|��
}}}tjgg|d|
||||��	|_tjgg|d|
|
|||��	|_tjggf|||||dd�|��|_t0|j.j3�_t7j8t:j<t:j<||	||j>d��|_ t7j8t:j<t:j<||	||j>d��|_!|jE|�|j*|j,|j.|j@|jBfD]}|jG|��|jI|�ycc}}w)z�
        bbox is the Bound2D bounding box in display coords of the Axes
        loc is the tick location in data coords
        size is the tick size in points
        N�axes.grid.which��bothr�	axes.grid�r �minorFrr#�.z.sizez.widthz.colorz.padz.labelcolor�inheritz
.labelsizeg{�G�z�?z
grid.colorzgrid.linestylezgrid.linewidthz
grid.alpha��none)r�	linestyler�visible�markeredgecolor�
markersize�markeredgewidth�)r�alphar)r(�	linewidth�marker�)�fontsizerr)�rotation)%�super�__init__�mpl�rcParams�
set_figure�figure�axes�_loc�_major�__name__�_size�_width�	_base_pad�_set_labelrotation�mlines�Line2Dr�_zorder�mcolors�_has_alpha_channel�items�	tick1line�	tick2line�gridline�GRIDLINE_INTERPOLATION_STEPS�get_path�_interpolation_steps�mtext�Text�np�nan�_labelrotation�label1�label2�_apply_tickdir�_set_artist_props�update_position)�selfr:�locr
rrr
rrrrrrrrrrrrrrr�kwargs�name�major_minor�k�v�grid_kw�artist�	__class__s                             ��1/usr/lib/python3/dist-packages/matplotlib/axis.pyr5z
Tick.__init__:s����8	�����>��#�,�,�'8�9�.�/����k�2���#�,�,�/@�"A�%6�#7����k�2����������$���	���	�����}�}��!&�g�G���<��<�<�4�&��+��e� <�=�D���
��=��L�L�D�6��;�-�v�!>�?�E�����=��L�L�D�6���1�E��;��,�,�$��q��
�T�:�;�C�����������k�&:�;�J���"������f�o�6�J�������v�Z�%8�9�I����
�.��>�����-�-��4�����-�-����������l�3�J��!� �\�\�*:�;�N��!� �\�\�*:�;�N���g�&@�&@��&L����l�3�J�(.����7���1�1�Q�R�5�!�8�7��7�������6�&�'�!�d�E�
���
 ������6�&�'�!�d�E�
���
�
�
���
��J��$��r�
��	
��
�
)�	
�
�
��� �5��j�j��F�F�B�F�F��j�(��(�(��+�-����j�j��F�F�B�F�F��j�(��(�(��+�-���
	
���G�$��~�~�t�~�~�t�}�}��{�{�D�K�K�1�	+�F��"�"�6�*�	+�	
���S�!��G8s�O(z3.1zTick.label1z3.8)�alternative�removalc��|jS�N)rS�rXs rb�labelz
Tick.label�s���{�{��c��t|t�r|}d}n t|ttf�r|\}}nd}|}t	j
ddg|��||f|_y)Nr�default�auto)r)�
isinstance�str�tuple�listr�
check_in_listrR)rXr�mode�angles    rbrAzTick._set_labelrotation�sX���m�S�)� �D��E�
�
��t�}�
5�'�K�D�%��D�!�E����F�I�.�d�C�#�U�m��ric���|� tj|j�d�}tjgd�|��||_|j|j�z|_y)z;Set tick direction.  Valid values are 'out', 'in', 'inout'.Nz
.direction)�in�out�inout)r
)	r6r7r=rrq�_tickdirr@�get_tick_padding�_pad�rXr
s  rbrUzTick._apply_tickdir�sS���?��l�l�d�m�m�_�J�#?�@�G����1�7�C���
��N�N�T�%:�%:�%<�<��	ri�3.5z`.Axis.set_tick_params`)rcc�4�|j|�d|_y�NT)rU�staler{s  rb�
apply_tickdirzTick.apply_tickdir�s�����G�$���
ric��|jSrf)rxrgs rb�get_tickdirzTick.get_tickdir�s���}�}�ric�F�dddd�}|j||jzS)z/Get the length of the tick outside of the Axes.���?��?)rurwrv)r>rx)rX�paddings  rbryzTick.get_tick_padding�s.�����
��
�z�z�G�D�M�M�2�2�2ric�x�|j|j|j|j|jg}|Srf)rHrIrJrSrT)rX�childrens  rb�get_childrenzTick.get_children�s.���N�N�D�N�N��M�M�4�;�;����=���ric�l��t�|�||�|jj||�d|_yr~)r4�
set_clip_pathrJr)rX�clippath�	transformras   �rbr�zTick.set_clip_path�s-���
���h�	�2��
�
�#�#�H�i�8���
ri�3.6c�N�|jj|jzdzS)N�H)r9�dpir@rgs rb�get_pad_pixelszTick.get_pad_pixels�s���{�{������/�"�4�4ric�>�|j|�\}}|�||fSdifS)z�
        Test whether the mouse event occurred in the Tick marks.

        This function always returns false.  It is more useful to test if the
        axis as a whole contains the mouse rather than the set of tick marks.
        F)�_default_contains)rX�
mouseevent�inside�infos    rb�containsz
Tick.contains�s2���-�-�j�9�������4�<���b�y�ric�6�|j|��d|_y)zm
        Set the tick label pad in points

        Parameters
        ----------
        val : float
        )rTN)�
_apply_paramsr�rX�vals  rb�set_padzTick.set_pads��	
���s��#���
ric��|jS)z.Get the value of the tick label pad in points.)r@rgs rb�get_padzTick.get_pads���~�~�ric��y)z Get the default Text 1 instance.N�rgs rb�
_get_text1zTick._get_text1��ric��y)z Get the default Text 2 instance.Nr�rgs rb�
_get_text2zTick._get_text2r�ric��y)z-Get the default `.Line2D` instance for tick1.Nr�rgs rb�_get_tick1linezTick._get_tick1liner�ric��y)z-Get the default `.Line2D` instance for tick2.Nr�rgs rb�_get_tick2linezTick._get_tick2line r�ric��y)z6Get the default grid `.Line2D` instance for this tick.Nr�rgs rb�
_get_gridlinezTick._get_gridline#r�ric��|jS)z3Return the tick location (data coords) as a scalar.)r;rgs rb�get_loczTick.get_loc&s���y�y�ric�l�|j�sd|_y|j|j|j	���|j
|j|j|j|jfD]}|j|��|j|j�d|_y)NF��gid)�get_visibler�
open_groupr=�get_gidrJrHrIrSrT�draw�close_group)rX�rendererr`s   rbr�z	Tick.draw*s������!��D�J�����D�M�M�t�|�|�~��>��}�}�d�n�n�d�n�n��{�{�D�K�K�1�	"�F��K�K��!�	"�	���T�]�]�+���
ric�H�|jj|�d|_y)z]
        Set the label1 text.

        Parameters
        ----------
        s : str
        TN)rS�set_textr�rX�ss  rb�
set_label1zTick.set_label16���	
�����Q����
ric�H�|jj|�d|_y)z]
        Set the label2 text.

        Parameters
        ----------
        s : str
        TN)rTr�rr�s  rb�
set_label2zTick.set_label2Cr�ric���t�|�|�|jj|�|jj|�d|_y)zl
        Set the url of label1 and label2.

        Parameters
        ----------
        url : str
        TN)r4�set_urlrSrTr)rX�urlras  �rbr�zTick.set_urlNs<���	����������C� ������C� ���
ric�:�|j|j�yrf�r8r9�rX�as  rbrVzTick._set_artist_props[s��	���T�[�[�!ric��td��)zX
        Return the view limits ``(min, max)`` of the axis the tick belongs to.
        �Derived must override��NotImplementedErrorrgs rb�get_view_intervalzTick.get_view_interval^s��"�"9�:�:ric���d|jfd|jfd|jfd|jfd|jffD]*\}}|�vs�|j�j
|���,t�fd�dD���r=�j
d|j�|_�j
d	|j�|_	�j
d
|j�|_
|j�j
d|j��|j|jfD]8}|j|j�|j|j��:|j�d}|jj!|�|j#�d}|jj!|��j%�D��cic]
\}}|d
vs�||��}}}d�vr�d|d<|jj&di|��|jj&di|��|j%�D]\}}t)|d|z|��d�vrr|j+�j
d��|jj'|j,d��|jj'|j,d���j%�D��cic]\}}|dvr|dd|��}	}}|jj&di|	��|jj&di|	���j%�D��cic]\}}|t.vr|dd|��}
}}|jj&di|
��ycc}}wcc}}wcc}}w)Nrrrrrc3�&�K�|]}|�v���
y�wrfr�)�.0r]rZs  �rb�	<genexpr>z%Tick._apply_params.<locals>.<genexpr>ls�����H�q�q�F�{�H�s�)r
rrr
r
rrr
r)rrrr*�_rr1)r3)rrr&r�)rJrHrIrSrT�set_visible�pop�anyr>r?r@rUrx�set_markersize�set_markeredgewidth�_get_text1_transform�
set_transform�_get_text2_transformrG�set�setattrrArR�_gridline_param_names)rXrZr[�target�line�transr]r^�tick_kw�label_kwr_s `         rbr�zTick._apply_paramsds)���&��
�
�6�'����8�'����8�(�$�+�+�6�(�$�+�+�6�	8�	5�L�D�&�
�v�~��"�"�6�:�:�d�#3�4�
	5��H�$G�H�H����F�D�J�J�7�D�J�!�*�*�W�d�k�k�:�D�K�#�Z�Z��t�~�~�>�D�N�
����
�
�9�d�m�m� D�E�������8�
6���#�#�D�J�J�/��(�(����5�
6��-�-�/��2�E��K�K�%�%�e�,��-�-�/��2�E��K�K�%�%�e�,�$*�L�L�N�O�D�A�q�a�;N�6N�1�a�4�O��O��f��)/���G�%�&�������%�W�%�������%�W�%��M�M�O�	&�D�A�q��D�#��'�1�%�	&��f�$��#�#�F�J�J��$?�@��K�K�O�O�T�%8�%8��%;�O�<��K�K�O�O�T�%8�%8��%;�O�<�)/����9���A��7�7��a�b�E�1�H�9��9�������#�(�#�������#�(�#�(.����2���1��0�0��Q�R�5�!�8�2��2���
�
���$�G�$��)P��9��
2s�M;�$M;�!N�Nc��td��)�:Set the location of tick in data coords with scalar *loc*.r�r��rXrYs  rbrWzTick.update_position����!�"9�:�:ric��td���Nr�r�rgs rbr�zTick._get_text1_transform����!�"9�:�:ric��td��r�r�rgs rbr�zTick._get_text2_transform�r�rirf)(r=�
__module__�__qualname__�__doc__r5�propertyr�
deprecatedrhrArUr�r�ryr�r�r�r�r�r�r�r�r�r�r�r��martist�allow_rasterizationr�r��	set_labelr�r�rVr�r�rWr�r��
__classcell__�ras@rbr	r	$sS����.�������������������)C"�J��T�_�_�U�
�u�E��F���
,�
=��T�_�_�U�(A�B��C���3��
��T�_�_�U��5��5�
�	��/�/�<�<�E��
� � �	�!�	�	��I�	��"�;�-%�^;�;�;rir	c�H��eZdZdZdZ�fd�Zd�Zd�Z�fd�Zd�Zd�Z	�xZ
S)	�XTickzq
    Contains all the Artists needed to make an x tick - the tick line,
    the label text and the grid line
    �xtickc�0��t�|�|i|��|j}|jj	dgdgf|jd���|jj	dgdgf|jd���|jj	ddgddgf|jd���|j�\}}}|jj	dd|||��|j�\}}}|jj	dd|||��y�Nr�tick1)�datar�r1�tick2�grid��x�y�verticalalignment�horizontalalignmentr�)r4r5r:rHr��get_xaxis_transformrIrJr�rSr�rT�rX�argsrZ�axr��va�haras       �rbr5zXTick.__init__��!���
���$�)�&�)�
�Y�Y��������#��s��r�'=�'=�g�'F�	�	H�������#��s��r�'=�'=�g�'F�	�	H��
�
����a�&�1�a�&�!�R�-C�-C�F�-K�	�	M��1�1�3�
��r�2�������1� �b�E�	�	
��1�1�3�
��r�2�������1� �b�E�	�	
ric�L�|jj|j�Srf)r:�get_xaxis_text1_transformrzrgs rbr�zXTick._get_text1_transform�����y�y�2�2�4�9�9�=�=ric�L�|jj|j�Srf)r:�get_xaxis_text2_transformrzrgs rbr�zXTick._get_text2_transform�r
ric�4��t�|�|�tjtjftjtjfdd�|j
\}}|jj|�|jj|�y)N)�|r�rvrurw)	r4rUrB�TICKDOWN�TICKUPrxrH�
set_markerrI�rXr
�mark1�mark2ras    �rbrUzXTick._apply_tickdir�sr���
���w�'��O�O�V�]�]�3��=�=�&�/�/�2��
��-�-�	���u�
	
���!�!�%�(����!�!�%�(ric�4�|jj|f�|jj|f�|jj|f�|jj|�|jj|�||_d|_y�r�TN)	rH�	set_xdatarIrJrS�set_xrTr;rr�s  rbrWzXTick.update_position��p����� � �#��(���� � �#��(��
�
�����'������#�������#����	���
ric�B�|jjjSrf)r:�viewLim�	intervalxrgs rbr�zXTick.get_view_interval�����y�y� � �*�*�*ri�r=r�r�r�r5r�r�rUrWr�r�r�s@rbr�r���-�����H�
�,>�>�	)��+rir�c�H��eZdZdZdZ�fd�Zd�Zd�Z�fd�Zd�Zd�Z	�xZ
S)	�YTickzp
    Contains all the Artists needed to make a Y tick - the tick line,
    the label text and the grid line
    �ytickc�0��t�|�|i|��|j}|jj	dgdgf|jd���|jj	dgdgf|jd���|jj	ddgddgf|jd���|j�\}}}|jj	dd|||��|j�\}}}|jj	dd|||��yr�)r4r5r:rHr��get_yaxis_transformrIrJr�rSr�rTrs       �rbr5zYTick.__init__�rric�L�|jj|j�Srf)r:�get_yaxis_text1_transformrzrgs rbr�zYTick._get_text1_transform�r
ric�L�|jj|j�Srf)r:�get_yaxis_text2_transformrzrgs rbr�zYTick._get_text2_transform�r
ric�4��t�|�|�tjtjftjtjfdd�|j
\}}|jj|�|jj|�y)N)r�r�r)	r4rUrB�TICKLEFT�	TICKRIGHTrxrHrrIrs    �rbrUzYTick._apply_tickdir�sv���
���w�'��O�O�V�%5�%5�6��#�#�V�_�_�5��
��-�-�	���u�
	
���!�!�%�(����!�!�%�(ric�4�|jj|f�|jj|f�|jj|f�|jj|�|jj|�||_d|_yr)	rH�	set_ydatarIrJrS�set_yrTr;rr�s  rbrWzYTick.update_position	rric�B�|jjjSrf)r:r�	intervalyrgs rbr�zYTick.get_view_intervalrrirr�s@rbr"r"�r rir"c�~�eZdZdZd�Zed��Zejd��Zed��Zejd��Zy)�Tickera2
    A container for the objects defining tick position and format.

    Attributes
    ----------
    locator : `matplotlib.ticker.Locator` subclass
        Determines the positions of the ticks.
    formatter : `matplotlib.ticker.Formatter` subclass
        Determines the format of the tick labels.
    c�<�d|_d|_d|_d|_yr~)�_locator�
_formatter�_locator_is_default�_formatter_is_defaultrgs rbr5zTicker.__init__$s ����
����#'�� �%)��"ric��|jSrf)r5rgs rb�locatorzTicker.locator*s���}�}�ric�\�t|tj�std��||_y)Nz7locator must be a subclass of matplotlib.ticker.Locator)rm�mticker�Locator�	TypeErrorr5�rXr:s  rbr:zTicker.locator.s)���'�7�?�?�3��8�9�
9���
ric��|jSrf)r6rgs rb�	formatterzTicker.formatter5������ric�\�t|tj�std��||_y)Nz;formatter must be a subclass of matplotlib.ticker.Formatter)rmr<�	Formatterr>r6�rXrAs  rbrAzTicker.formatter9s+���)�W�%6�%6�7��:�;�
;�#��riN)	r=r�r�r�r5r�r:�setterrAr�rirbr3r3sf��	�*�����
�^�^� �� ��������$��$rir3c��eZdZdZd�Zd�Zy)�
_LazyTickListz�
    A descriptor for lazy instantiation of tick lists.

    See comment above definition of the ``majorTicks`` and ``minorTicks``
    attributes.
    c��||_yrf)r<)rXrs  rbr5z_LazyTickList.__init__Is	����ric�"�|�|S|jr@g|_|jd��}|jj|�|jSg|_|jd��}|jj|�|jS)NT�rF)r<�
majorTicks�	_get_tick�append�
minorTicks)rX�instance�cls�ticks    rb�__get__z_LazyTickList.__get__Ls������K��{�{�&(��#��)�)��)�5���#�#�*�*�4�0��*�*�*�&(��#��)�)��)�6���#�#�*�*�4�0��*�*�*riN)r=r�r�r�r5rSr�rirbrHrHAs����+rirHc�X��eZdZdZdZdZd�Zejdd��ds�fd�	�Z	e
d	��Zejd
��Ze
d��Z
e
jd��Z
e
d
��Zejd��Ze
d��Zejd��Zed��Zed��Zd�Zd�Ze
eed��Zdtd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd �Zd!�Zd"�Z d#�Z!d$�Z"dud%�Z#e$d&��Z%dt�fd'�	Z&d(�Z'dvd)�Z(d*�Z)dvd+�Z*d,�Z+d-�Z,d.�Z-dd/�d0�Z.d1�Z/ej`d�d2��Z1d3�Z2dtd4�Z3dtdd5�d6�Z4d7�Z5e6jnd8��Z8d9�Z9d:�Z:d;�Z;d<�Z<d=�Z=d>�Z>dwd?�Z?d@�Z@dA�ZAdvdB�ZBdC�ZCdD�ZDddE�dF�ZEdvdG�ZFdH�ZGdI�ZHdJ�ZIdK�ZJdL�ZKdM�ZLdN�ZMdO�ZNdtdP�ZOdtdQ�ZPej�dRdSdT�dxdU��ZRdV�ZSdW�ZTdX�ZUdY�ZVdZ�ZWd[�ZXdtd\�ZYd]�ZZd^�Z[d_�Z\d`�Z]da�Z^db�Z_e
e<e_dc��Z`e$dd��ZaddE�de�Zbdddf�dg�ZcddE�dh�ZddtddE�di�Zedj�Zfdk�Zgdl�Zhdtdm�Zidn�Zjdo�Zkdp�Zldq�Zmdr�Zn�xZoS)y�Axisa�
    Base class for `.XAxis` and `.YAxis`.

    Attributes
    ----------
    isDefault_label : bool

    axes : `matplotlib.axes.Axes`
        The `~.axes.Axes` to which the Axis belongs.
    major : `matplotlib.axis.Ticker`
        Determines the major tick positions and their label format.
    minor : `matplotlib.axis.Ticker`
        Determines the minor tick positions and their label format.
    callbacks : `matplotlib.cbook.CallbackRegistry`

    label : `.Text`
        The axis label.
    labelpad : float
        The distance between the axis label and the tick labels.
        Defaults to :rc:`axes.labelpad` = 4.
    offsetText : `.Text`
        A `.Text` object containing the data offset of the ticks (if any).
    pickradius : float
        The acceptance radius for containment tests. See also `.Axis.contains`.
    majorTicks : list of `.Tick`
        The major ticks.
    minorTicks : list of `.Tick`
        The minor ticks.
    �Nc��djt|�jg|jjjd����S)Nz	{}({},{})�rr)�format�typer=r:�	transAxesr�rgs rb�__str__zAxis.__str__�sD��!�{�!�!���J���I�"&�)�)�"5�"5�"?�"?��"G�I�	Irir��
pickradius)r[c�d��t�|��d|_|j|j�d|_||_t�|_t�|_	tjddg��|_d|_
tjt j"t j"t$j&dt$j&dt$j&d��|_|j+|j(�tjt j"t j"�|_|j+|j,�t$j&d	|_||_t3�|_t3�|_|j9�d|_y
)a
        Parameters
        ----------
        axes : `matplotlib.axes.Axes`
            The `~.axes.Axes` to which the created Axis belongs.
        pickradius : float
            The acceptance radius for containment tests. See also
            `.Axis.contains`.
        T�units�units finalize��signalszaxes.labelsizezaxes.labelweightzaxes.labelcolor)r2�
fontweightrz
axes.labelpadN)r4r5�_remove_overlapping_locsr8r9�isDefault_labelr:r3rr#r�CallbackRegistry�	callbacks�
_autolabelposrNrOrPrQr6r7rhrV�
offsetText�labelpadr]�dict�_major_tick_kw�_minor_tick_kw�clear�
_autoscale_on)rXr:r]ras   �rbr5z
Axis.__init__�s0���	����(,��%�������$�#�����	��X��
��X��
��/�/��.�/�1���"����Z�Z��F�F�B�F�F��\�\�"2�3��|�|�$6�7��,�,�0�1�	
��
�	
���t�z�z�*��*�*�R�V�V�R�V�V�4������t���/����_�5��
�$���#�f���"�f����
�
��!��ric�.�|jjSrf�rr7rgs rb�isDefault_majloczAxis.isDefault_majloc�����z�z�-�-�-ric�&�||j_yrfrq�rX�values  rbrrzAxis.isDefault_majloc����).��
�
�&ric�.�|jjSrf�rr8rgs rb�isDefault_majfmtzAxis.isDefault_majfmt�����z�z�/�/�/ric�&�||j_yrfryrus  rbrzzAxis.isDefault_majfmt����+0��
�
�(ric�.�|jjSrf�r#r7rgs rb�isDefault_minloczAxis.isDefault_minloc�rsric�&�||j_yrfrrus  rbr�zAxis.isDefault_minloc�rwric�.�|jjSrf�r#r8rgs rb�isDefault_minfmtzAxis.isDefault_minfmt�r{ric�&�||j_yrfr�rus  rbr�zAxis.isDefault_minfmt�r}riTrKFc��|jSrf)rdrgs rb�get_remove_overlapping_locsz Axis.get_remove_overlapping_locs�s���,�,�,ric�$�t|�|_yrf)�boolrdr�s  rb�set_remove_overlapping_locsz Axis.set_remove_overlapping_locs�s��(,�S�	��%rizUIf minor ticker locations that overlap with major ticker locations should be trimmed.)�docc��d|_|�|jj}|jj	|�|jj||f�d|_y)a
        Set the coordinates of the label.

        By default, the x coordinate of the y label and the y coordinate of the
        x label are determined by the tick label bounding boxes, but this can
        lead to poor alignment of multiple labels if there are multiple axes.

        You can also specify the coordinate system of the label with the
        transform.  If None, the default coordinate system will be the axes
        coordinate system: (0, 0) is bottom left, (0.5, 0.5) is center, etc.
        FNT)rhr:r[rhr��set_positionr)rXr�r�r�s    rb�set_label_coordszAxis.set_label_coords�sP��#������	�	�+�+�I��
�
� � ��+��
�
����A��'���
ric�6�|jj�Srf)�_scale�
get_transformrgs rbr�zAxis.get_transform�s���{�{�(�(�*�*ric�.�|jjS)z#Return this Axis' scale (as a str).)r�r[rgs rb�	get_scalezAxis.get_scale�s���{�{���ric���t|tj�stj||fi|��|_n||_|jj|�d|_d|_d|_d|_	yr~)
rm�mscale�	ScaleBase�
scale_factoryr��#set_default_locators_and_formattersrrr�rzr�)rXrvrZs   rb�
_set_scalezAxis._set_scalesd���%��!1�!1�2� �.�.�u�d�E�f�E�D�K��D�K����7�7��=� $��� $��� $��� $��ric
��|jjj�D��cgc]\}}||ur|��
c}}\}|j�j	t
jt
j�}|jj|}|j|j�D]9}|j|j|fi|��|j�d|_�;|j�j	t
jt
j�}||k7rF|jjdi|jjD�	cic]}	d|	��|	|k(��
c}	��yycc}}wcc}	w)a7
        Set this Axis' scale.

        Parameters
        ----------
        value : {"linear", "log", "symlog", "logit", ...} or `.ScaleBase`
            The axis scale type to apply.

        **kwargs
            Different keyword arguments are accepted, depending on the scale.
            See the respective class keyword arguments:

            - `matplotlib.scale.LinearScale`
            - `matplotlib.scale.LogScale`
            - `matplotlib.scale.SymmetricalLogScale`
            - `matplotlib.scale.LogitScale`
            - `matplotlib.scale.FuncScale`

        Notes
        -----
        By default, Matplotlib supports the above-mentioned scales.
        Additionally, custom scales may be registered using
        `matplotlib.scale.register_scale`. These scales can then also
        be used here.
        T�scaleNr�)r:�	_axis_maprG�get_major_locator�nonsingularrP�inf�_shared_axes�get_siblingsr��_update_transScaler�autoscale_view�_axis_names)
rXrvrZr[�axis�old_default_lims�gr�new_default_limsr]s
          rb�_set_axes_scalezAxis._set_axes_scalesI��4)-�	�	�(;�(;�(A�(A�(C�"�*�$���D�L��"��� �2�2�4�(�[�"�&�&��"�&�&�9�	��I�I�"�"�4�(���.�.����+�	�B�)�B�L�L���)�)�%�:�6�:��!�!�#��B�H�	�!�2�2�4�(�[�"�&�&��"�&�&�9�	��/�/�
%�D�I�I�$�$�
K�37�9�9�3H�3H�I�a�U�1�#�;��T�	�)�I�
K�0��"��Js�E4�E:c�X�|jj|||j��Srf)r��limit_range_for_scale�
get_minpos)rX�vmin�vmaxs   rbr�zAxis.limit_range_for_scale;s"���{�{�0�0��t�T�_�_�=N�O�Oric��|jS)z'Return whether this Axis is autoscaled.�rorgs rb�_get_autoscale_onzAxis._get_autoscale_on>s���!�!�!ric��||_y)z�
        Set whether this Axis is autoscaled when drawing or by
        `.Axes.autoscale_view`.

        Parameters
        ----------
        b : bool
        Nr�)rX�bs  rb�_set_autoscale_onzAxis._set_autoscale_onBs����ric�r�|j|jg|j��|j��Srf)rhri�get_major_ticks�get_minor_ticksrgs rbr�zAxis.get_childrenMs?���
�
�D�O�O�B��%�%�'�B�*.�*>�*>�*@�B�	Bric��|jj�tjdxrtjddv|jd<y)Nr!rrr)rlrnr6r7rgs rb�_reset_major_tick_kwzAxis._reset_major_tick_kwQ�I�����!�!�#����[�)�E����.�/�3D�D�	
���H�%ric��|jj�tjdxrtjddv|jd<y)Nr!rr"r)rmrnr6r7rgs rb�_reset_minor_tick_kwzAxis._reset_minor_tick_kwWr�ric���|jjd�|jd�tjddg��|_tjdxrtjddv|jd	<tjdxrtjdd
v|jd	<|j�d|_d|_|jd�d|_y)
z�
        Clear the axis.

        This resets axis properties to their default values:

        - the label
        - the scale
        - locators, formatters and ticks
        - major and minor grid
        - units
        - registered callbacks
        r-�linearr_r`rar!rrrr"NT)rhr�r�rrfrgr6r7rlrm�reset_ticks�	converterr_�	set_unitsrrgs rbrnz
Axis.clear]s���	
�
�
���B������!��/�/��.�/�1���
���[�)�E����.�/�3D�D�	
���H�%����[�)�E����.�/�3D�D�	
���H�%�	
���������
����t����
ric��	|`	|`	|j|jj
�y#t$rY�5wxYw#t$rY�AwxYw#t$rYywxYw)zs
        Re-initialize the major and minor Tick lists.

        Each list starts with a single fresh Tick.
        N)rL�AttributeErrorrOr�r:�patchrgs rbr�zAxis.reset_ticks�sk��	���	���	����t�y�y���/���	��	���	��	���	��	�s,�.�=�%A�	:�:�	A	�A	�	A�Ac�X�tjgd�|��|j|�}|rv|dvr+|j�|jj|�|dvr+|j
�|jj|�|j�d	|_y
|dvr>|jj|�|jD]}|jdi|���|dvr>|jj|�|jD]}|jdi|���d|vsd|vrS|jj|jjdd�xs|jjdd��d|vr|jj|d�d	|_y
)z�
        Set appearance parameters for ticks, ticklabels, and gridlines.

        For documentation of keyword arguments, see
        :meth:`matplotlib.axes.Axes.tick_params`.
        �rr#r ��which�rr �r#r rrFrTNr�)rrq�_translate_tick_paramsr�rl�updater�rmr�rLr�rOrir��get�	set_colorr)rXr��resetrZ�kwtransrRs      rb�set_tick_paramszAxis.set_tick_params�s���	
���5�U�C��-�-�f�5����)�)��)�)�+��#�#�*�*�7�3��)�)��)�)�+��#�#�*�*�7�3�����$��
�!�)�)��#�#�*�*�7�3� �O�O�2�D�&�D�&�&�1��1�2��)�)��#�#�*�*�7�3� �O�O�2�D�&�D�&�&�1��1�2��W�$�
�g�(=����+�+��'�'�+�+�J��>�B��*�*�.�.�z�5�A�C��w�&����)�)�'�,�*?�@���
ric�r�ddddddddd	d
ddd
dddddddddddgt�}dddd
d
ddddd
d
d�}|j�D��cic]\}}||vr||j|���}}}d|vr|jd�}||d<||d<|D]}||vs�td|�d|����|j	|�|Scc}}w)a�
        Translate the kwargs supported by `.Axis.set_tick_params` to kwargs
        supported by `.Tick._apply_params`.

        In particular, this maps axis specific names like 'top', 'left'
        to the generic tick1, tick2 logic of the axis. Additionally, there
        are some other name translations.

        Returns a new dict of translated kwargs.

        Note: The input *kwargs* are currently modified, but that's ok for
        the only caller.
        r
rrr
rrrrrrrrr�length�	direction�left�bottom�right�top�	labelleft�labelbottom�
labelright�labeltopr)r�r�r3r�r�r�r�r�r�r�r��colorszkeyword z' is not recognized; valid keywords are )r�rGr��
ValueErrorr�)�kw�allowed_keys�keymap�oldkey�newkeyr��c�keys        rbr�zAxis._translate_tick_params�s$��"
�G�W�i����x���y�*�j��k�6�8�W�e����j��
$�#�$���"�'�����#�%�$�"�

��*0����I�%�v�v�6�R�<��2�6�6�&�>�)�I��I��r�>����x� �A� �G�G��$%�G�L�!��	+�C��,�&� ��L�*�+�+�	+�
	���r�����Is� B3c���t�|�||�|j|jzD]}|j||��d|_yr~)r4r�rLrOr)rXr�r��childras    �rbr�zAxis.set_clip_path�sE���
���h�	�2��_�_�t���6�	5�E�����)�4�	5���
ric��td��)z3Return the ``(min, max)`` view limits of this axis.r�r�rgs rbr�zAxis.get_view_interval�r�ric��td��)a7
        Set the axis view limits.  This method is for internal use; Matplotlib
        users should typically use e.g. `~.Axes.set_xlim` or `~.Axes.set_ylim`.

        If *ignore* is False (the default), this method will never reduce the
        preexisting view limits, only expand them if *vmin* or *vmax* are not
        within them.  Moreover, the order of *vmin* and *vmax* does not matter;
        the orientation of the axis will not change.

        If *ignore* is True, the view limits will be set exactly to ``(vmin,
        vmax)`` in that order.
        r�r��rXr�r��ignores    rb�set_view_intervalzAxis.set_view_interval�s��"�"9�:�:ric��td��)z3Return the ``(min, max)`` data limits of this axis.r�r�rgs rb�get_data_intervalzAxis.get_data_intervalr�ric��td��)a�
        Set the axis data limits.  This method is for internal use.

        If *ignore* is False (the default), this method will never reduce the
        preexisting data limits, only expand them if *vmin* or *vmax* are not
        within them.  Moreover, the order of *vmin* and *vmax* does not matter;
        the orientation of the axis will not change.

        If *ignore* is True, the data limits will be set exactly to ``(vmin,
        vmax)`` in that order.
        r�r�r�s    rb�set_data_intervalzAxis.set_data_intervals��"�"9�:�:ric�2�|j�\}}||kS)a.
        Return whether this Axis is oriented in the "inverse" direction.

        The "normal" direction is increasing to the right for the x-axis and to
        the top for the y-axis; the "inverse" direction is increasing to the
        left for the x-axis and to the bottom for the y-axis.
        )r�)rX�low�highs   rb�get_invertedzAxis.get_inverteds ���*�*�,�	��T��c�z�ric�z�|j�\}}|jt||ft|���ddi�y)a+
        Set whether this Axis is oriented in the "inverse" direction.

        The "normal" direction is increasing to the right for the x-axis and to
        the top for the y-axis; the "inverse" direction is increasing to the
        left for the x-axis and to the bottom for the y-axis.
        ��reverserlN)r��_set_lim�sortedr�)rX�invertedr�r�s    rb�set_invertedzAxis.set_inverted(s8���%�%�'���1���
�
�v�q�!�f�d�8�n�=�I�D�Iric��y)z{
        Set the default limits for the axis data and view interval if they
        have not been not mutated yet.
        Nr�rgs rb�set_default_intervalszAxis.set_default_intervals4r�ri)�emitc�8�|jjj�D��cgc]\}}||ur|��
c}}\}|jj|||ffgd��|jj	||j
�}|jj	||j
�}|�|�|j
�\}}|�|}|�|}|j�dk(r]|dks|dkrS|j
�\}}|dkrtjd|�d��|}|dkrtjd|�d��|}||k(rtjd|�d��t||kD�}	|j�j||�\}}|j||�\}}t||gt|	��	�\}}|j||d
��|jj |j#|j�D]}
d|
j$|<�|�|j't|��|r�|jj(j+|�d�|j�|jj |j#|j�D]q}||jus�|j|j-||d|�
�|j.|j.k7s�N|j.j0j3��sd
|_||fScc}}w)a`
        Set view limits.

        This method is a helper for the Axes ``set_xlim``, ``set_ylim``, and
        ``set_zlim`` methods.

        Parameters
        ----------
        v0, v1 : float
            The view limits.  (Passing *v0* as a (low, high) pair is not
            supported; normalization must occur in the Axes setters.)
        emit : bool, default: True
            Whether to notify observers of limit change.
        auto : bool or None, default: False
            Whether to turn on autoscaling of the x-axis. True turns on, False
            turns off, None leaves unchanged.
        F)�convert�logrzAttempt to set non-positive z)lim on a log-scaled axis will be ignored.z)Attempting to set identical low and high z<lims makes transformation singular; automatically expanding.r�T�r��lim_changed)r�rl)r:r�rG�_process_unit_info�_validate_converted_limits�
convert_unitsr�r�r�
warn_externalr�r�r�r�r�r�r�r��_stale_viewlimsr�rg�processr�r9�canvas�	draw_idler)rX�v0�v1r�rlr[r��old0�old1r�r�others            rbr�z
Axis._set_limBs
��$)-�	�	�(;�(;�(A�(A�(C�"�*�$���D�L��"���	
�	�	�$�$�t�b�"�X�&6�%7��$�G�
�Y�Y�
1�
1�"�d�6H�6H�
I��
�Y�Y�
1�
1�"�d�6H�6H�
I��
�:����/�/�1�J�D�$��z����z����>�>��u�$�"��'�R�1�W��/�/�1�J�D�$��Q�w��"�"�%A�$��HH�$I�J����Q�w��"�"�%A�$��HH�$I�J���
��8����;�D�6�BJ�K�
L��r�B�w�-���'�'�)�5�5�b�"�=���B��+�+�B��3���B���R��$�w�-�8���B����r�2�d��3��)�)�(�(��.�;�;�D�I�I�F�	-�B�',�B���t�$�	-����"�"�4��:�.���I�I���'�'�4�&��(<�d�i�i�H����/�/��5�B�B�4�9�9�M�
8����	�	�)��O�O�D�)�2�2��B�U��3�7��|�|�t�{�{�2����+�+�5�5�7�
8���
��2�v�
��o"s�Lc�@�|�y|j|j�yrfr�r�s  rbrVzAxis._set_artist_props�s���9��	���T�[�[�!ric��|j�}|j||�\}}t|�r tjj|�}n"tjj
dddd�}t|�r#tjj|�}||fStjj
dddd�}||fS)z>Get the extents of the tick labels on either side of the axes.r)�
_update_ticks�_get_ticklabel_bboxes�len�mtransforms�Bbox�union�from_extents)rXr��
ticks_to_draw�tlb1�tlb2�bbox1�bbox2s       rb�get_ticklabel_extentszAxis.get_ticklabel_extents�s����*�*�,�
��/�/�
�x�H�
��d��t�9��$�$�*�*�4�0�E��$�$�1�1�!�Q��1�=�E��t�9��$�$�*�*�4�0�E��e�|�� �$�$�1�1�!�Q��1�=�E��e�|�ric�\�|j�}|jjj|�}|j	t|��}|jjj
|�t|||�D]9\}}}|j|�|j|�|j|��;|j�}|jjj|�}|jt|��}	|jjj
|�t|	||�D]9\}}}|j|�|j|�|j|��;g|�|	�}
|j�\}}||kDr||}}|j�j!||g�}
g}|
D]X}	|j�j!|j#��}t%j&|
|�s�H|j)|��Z|S#t*$rY�hwxYw)z�
        Update ticks (position and labels) using the current data interval of
        the axes.  Return the list of ticks that will be drawn.
        )�get_majorticklocsrrA�format_ticksr�r�set_locs�ziprWr�r��get_minorticklocsr#r�r�r�r�r�r�_interval_contains_closerN�AssertionError)rX�
major_locs�major_labels�major_ticksrRrYrh�
minor_locs�minor_labels�minor_ticks�ticks�view_low�	view_high�
interval_tr�loc_ts                rbrzAxis._update_ticks�s��
�+�+�-�
��z�z�+�+�8�8��D���*�*�3�z�?�;���
�
���%�%�j�1� #�K��\� J�	#��D�#�u�� � ��%��O�O�E�"��O�O�E�"�	#��+�+�-�
��z�z�+�+�8�8��D���*�*�3�z�?�;���
�
���%�%�j�1� #�K��\� J�	#��D�#�u�� � ��%��O�O�E�"��O�O�E�"�	#�-�+�,��,��"�4�4�6���)��i��"+�X�i�H��'�'�)�3�3�X�y�4I�J�
��
��		/�D�
/��*�*�,�6�6�t�|�|�~�F���7�7�
�E�J�!�(�(��.�		/����"�
��
�s�-H�	H+�*H+c�Z�|�|jj�}|D�cgc]7}|jj�r|jj	|���9c}|D�cgc]7}|j
j�r|j
j	|���9c}fScc}wcc}w)z8Return lists of bboxes for ticks' label1's and label2's.)r9�
_get_rendererrSr��get_window_extentrT)rXr.r�rRs    rbrzAxis._get_ticklabel_bboxes�s������{�{�0�0�2�H�"�A��d�k�k�&=�&=�&?����.�.�x�8�A�#�A��d�k�k�&=�&=�&?����.�.�x�8�A�B�	B��A��As�<B#�#<B()�for_layout_onlyc���|j�sy��|jj��|j�}|j	��|j|��\}}|j
||�|jj|jjj��g�fd�|jfD��|�|�}|jj�r�|jj��}|r�|jdk(rG|jdkDr8|j |j"zdzdz
|_|j dz|_|jdk(rG|j$dkDr8|j&|j(zdzdz
|_|j&dz|_|j+|�|D�cgc]P}d|jcxkrt,j.kr+nn(d|j$cxkrt,j.krnn|��R}}|rt0j2j5|�Sycc}w)	a�
        Return a bounding box that encloses the axis. It only accounts
        tick labels, axis label, and offsetText.

        If *for_layout_only* is True, then the width of the label (if this
        is an x-axis) or the height of the label (if this is a y-axis) is
        collapsed to near zero.  This allows tight/constrained_layout to ignore
        too-long labels when doing their layout.
        Nc3�`�K�|]%}|j�r|j�����'y�wrf)r�r5)r�r�r�s  �rbr�z%Axis.get_tightbbox.<locals>.<genexpr>�s-�����"�������!�!�(�+�"�s�+.r�r�r�r�r�)r�r9r4r�_update_label_positionr�_update_offset_text_positionrir�rrA�
get_offsetrhr5�	axis_namer�x0�x1�height�y0�y1rNrPr�rrr)	rXr�r6rrr�bboxes�bbr�s	 `       rb�
get_tightbboxzAxis.get_tightbbox�s�������!�����{�{�0�0�2�H��*�*�,�
��#�#�H�-��/�/�
�x�H�
��d��)�)�$��5���� � ����!5�!5�!@�!@�!B�C�
�"����(�"�
��	
��	
���:�:�!�!�#����-�-�h�7�B���>�>�S�(�R�X�X��\��U�U�R�U�U�]�a�/�#�5�B�E��E�E�C�K�B�E��>�>�S�(�R�Y�Y��]��U�U�R�U�U�]�a�/�#�5�B�E��E�E�C�K�B�E��M�M�"��#�E������)�2�6�6�)�a�!�(�(�.C�R�V�V�.C��E��E���#�#�)�)�&�1�1���Es�AIc�$�g}t|j�r,|j|jdj��t|j�r,|j|jdj��t|d��S)Nr)rk)rrLrNryrO�max)rX�valuess  rbryzAxis.get_tick_paddingsh�����t�����M�M�$�/�/�!�,�=�=�?�@��t�����M�M�$�/�/�!�,�=�=�?�@��6�1�%�%ric�N�|j�sy|jt|j���|j	�}|j||�\}}|D]}|j
|��|j|�|jj
|�|j||�|jj|jjj��|jj
|�|jt�d|_y)Nr�F)r�r�r=r�rrr�r:rhr;rir�rrAr<r�r)rXr�rrZrrrrRs        rbr�z	Axis.draws������!�����H�$�,�,�.��9��*�*�,�
��/�/�
�x�H�
��d�!�	 �D��I�I�h��	 �	
�#�#�H�-��
�
����!��)�)�$��5���� � ����!5�!5�!@�!@�!B�C������X�&����X�&���
ric��|j�}tjd|D�cgc]}|j��c}�Scc}w)z6Return this Axis' grid lines as a list of `.Line2D`\s.zLine2D gridline)r�r�silent_listrJ)rXr.rRs   rb�
get_gridlineszAxis.get_gridlines-s=���$�$�&��� � �!2�<A�!B�D�$�-�-�!B�D�	D��!Bs�?
c��|jS)z)Return the axis label as a Text instance.)rhrgs rb�	get_labelzAxis.get_label3����z�z�ric��|jS)z.Return the axis offsetText as a Text instance.)rirgs rb�get_offset_textzAxis.get_offset_text7rBric��|jS)z0Return the depth of the axis used by the picker.)�_pickradiusrgs rb�get_pickradiuszAxis.get_pickradius;s�����ric�0�|j�|j�}|D�cgc])}|jj�s�|j��+}}|D�cgc])}|jj�s�|j��+}}||zScc}wcc}w)z@Return this Axis' major tick labels, as a list of `~.text.Text`.)rr�rSr�rT�rXr.rR�labels1�labels2s     rb�get_majorticklabelszAxis.get_majorticklabels?�|�������$�$�&��+0�N�4�D�K�K�4K�4K�4M�4�;�;�N��N�+0�N�4�D�K�K�4K�4K�4M�4�;�;�N��N��� � ��O��N��B�B�B�9Bc�0�|j�|j�}|D�cgc])}|jj�s�|j��+}}|D�cgc])}|jj�s�|j��+}}||zScc}wcc}w)z@Return this Axis' minor tick labels, as a list of `~.text.Text`.)rr�rSr�rTrVs     rb�get_minorticklabelszAxis.get_minorticklabelsGrZr[c��|�i|dk(r|j�S|dk(r|j�S|dk(r!|j�|j�zStjgd�|��|r|j�S|j�S)aq
        Get this Axis' tick labels.

        Parameters
        ----------
        minor : bool
           Whether to return the minor or the major ticklabels.

        which : None, ('minor', 'major', 'both')
           Overrides *minor*.

           Selects which ticklabels to return

        Returns
        -------
        list of `~matplotlib.text.Text`
        r#rr r�r�)r]rYrrq)rXr#r�s   rb�get_ticklabelszAxis.get_ticklabelsOs���$������/�/�1�1��'�!��/�/�1�1��&���/�/�1�D�4L�4L�4N�N�N��"�"�#=�U�K���+�+�-�-��'�'�)�)ric���g}|j�}|D]8}|j|j�|j|j��:t	j
d|�S)z<Return this Axis' major tick lines as a list of `.Line2D`\s.�Line2D ticklines)r�rNrHrIrrK�rX�linesr.rRs    rb�get_majorticklineszAxis.get_majorticklinesn�Z�����$�$�&���	)�D��L�L����(��L�L����(�	)�� � �!3�U�;�;ric���g}|j�}|D]8}|j|j�|j|j��:t	j
d|�S)z<Return this Axis' minor tick lines as a list of `.Line2D`\s.ra)r�rNrHrIrrKrbs    rb�get_minorticklineszAxis.get_minorticklineswreric�F�|r|j�S|j�S)z6Return this Axis' tick lines as a list of `.Line2D`\s.)rgrd�rXr#s  rb�
get_ticklineszAxis.get_ticklines�s#����*�*�,�,��&�&�(�(ric�6�|jj�S)z;Return this Axis' major tick locations in data coordinates.�rr:rgs rbr!zAxis.get_majorticklocs�s���z�z�!�!�#�#ric��tj|jj��}|jr�|j
j�}|jj�}|j|�}|j|�}t|j|j���\}}||z
dz}tj|dd�df|ddd�f|d��jd��}	||	}|S)z;Return this Axis' minor tick locations in data coordinates.g�h㈵��>Nr)�atol�rtolr1)r�)
rP�asarrayr#r:�remove_overlapping_locsrr�r�r�r�r��iscloser�)
rXr+r(r��
tr_minor_locs�
tr_major_locs�lo�hi�tol�masks
          rbr%zAxis.get_minorticklocs�s����Z�Z��
�
� 2� 2� 4�5�
��'�'����+�+�-�J����1�1�3�I�%�/�/�
�;�M�%�/�/�
�;�M��I�/�/��0F�0F�0H�I�J�F�B����7�d�"�C��:�:�m�A�t�G�4�m�D�!�G�6L�#&�Q�0�03�����
�#�T�E�*�J��ri�r#c�F�|r|j�S|j�S)a�
        Return this Axis' tick locations in data coordinates.

        The locations are not clipped to the current axis limits and hence
        may contain locations that are not visible in the output.

        Parameters
        ----------
        minor : bool, default: False
            True to return the minor tick directions,
            False to return the major tick directions.

        Returns
        -------
        numpy array of tick locations
        )r%r!ris  rb�get_ticklocszAxis.get_ticklocs�s#��",1�t�%�%�'�N�d�6L�6L�6N�Nric��|r;tj|j�D�cgc]}|j��c}�Stj|j	�D�cgc]}|j��c}�Scc}wcc}w)a;
        Get the tick directions as a numpy array

        Parameters
        ----------
        minor : bool, default: False
            True to return the minor tick directions,
            False to return the major tick directions.

        Returns
        -------
        numpy array of tick directions
        )rP�arrayr�rxr�)rXr#rRs   rb�get_ticks_directionzAxis.get_ticks_direction�sq����8�8�+/�+?�+?�+A�B�4����B�D�
D��8�8�+/�+?�+?�+A�B�4����B�D�
D��C��Cs�A9�A>c���|j�#td|jj�d���|r|jn|j
}|j|jdfd|i|��S)z!Return the default tick instance.zThe Axis subclass z3 must define _tick_class or reimplement _get_tick()rr)�_tick_classr�rar=rlrmr:)rXrr�s   rbrMzAxis._get_tick�sq�����#�%�$�T�^�^�%<�%<�$=�>9�9�:�
:�*/�$�%�%�D�4G�4G���t����	�	�1�E�E�E�W�E�Eric��|j}|jdtj|�d��}t	j
|��j
�S)z�
        Return the text size of tick labels for this Axis.

        This is a convenience function to avoid having to create a `Tick` in
        `.get_tick_space`, since it is expensive.
        rztick.labelsize)r
)rlr�r6r7rN�FontProperties�get_size_in_points)rXr=r�r
s    rb�_get_tick_label_sizezAxis._get_tick_label_size�sM���%�%���{�{�;��<�<�9�+�^�(D�E�G���#�#��.�A�A�C�Cric��|�|�y|jj|j�|jj|j�|jj|j�|jj|j�|j
j|j
�y)z3Copy the properties from *src* tick to *dest* tick.N)rS�update_fromrTrHrIrJ)rX�src�dests   rb�_copy_tick_propszAxis._copy_tick_props�s|���;�$�,��������
�
�+�������
�
�+����"�"�3�=�=�1����"�"�3�=�=�1��
�
�!�!�#�,�,�/ric�6�|jj�S)zGet the text of the label.)rh�get_textrgs rb�get_label_textzAxis.get_label_text�s���z�z�"�"�$�$ric�.�|jjS)z$Get the locator of the major ticker.rlrgs rbr�zAxis.get_major_locator�����z�z�!�!�!ric�.�|jjS)z$Get the locator of the minor ticker.)r#r:rgs rb�get_minor_locatorzAxis.get_minor_locator�r�ric�.�|jjS)z&Get the formatter of the major ticker.)rrArgs rb�get_major_formatterzAxis.get_major_formatter�����z�z�#�#�#ric�.�|jjS)z&Get the formatter of the minor ticker.)r#rArgs rb�get_minor_formatterzAxis.get_minor_formatter�r�ric�P�|�t|j��}t|j�|kre|jd��}|jj	|�|j|jd|�t|j�|kr�e|jd|S)z#Return the list of major `.Tick`\s.NTrKr)rr!rLrMrNr��rX�numticksrRs   rbr�zAxis.get_major_ticks�s������4�1�1�3�4�H��$�/�/�"�X�-��>�>��>�-�D��O�O�"�"�4�(��!�!�$�/�/�!�"4�d�;�	�$�/�/�"�X�-����y��)�)ric�P�|�t|j��}t|j�|kre|jd��}|jj	|�|j|jd|�t|j�|kr�e|jd|S)z#Return the list of minor `.Tick`\s.NFrKr)rr%rOrMrNr�r�s   rbr�zAxis.get_minor_tickss������4�1�1�3�4�H��$�/�/�"�X�-��>�>��>�.�D��O�O�"�"�4�(��!�!�$�/�/�!�"4�d�;�	�$�/�/�"�X�-����y��)�)rir|r�r)c��|r|�d}n|stjd�d}|j�}tjgd�|��|j	�D��cic]\}}d|��|��
}}}|dvr+|�|j
dn||d<|jd
d	d
i|��|dvr+|�|jdn||d<|jd
d	di|��d|_ycc}}w)a�
        Configure the grid lines.

        Parameters
        ----------
        visible : bool or None
            Whether to show the grid lines.  If any *kwargs* are supplied, it
            is assumed you want the grid on and *visible* will be set to True.

            If *visible* is *None* and there are no *kwargs*, this toggles the
            visibility of the lines.

        which : {'major', 'minor', 'both'}
            The grid lines to apply the changes on.

        **kwargs : `.Line2D` properties
            Define the line properties of the grid, e.g.::

                grid(color='r', linestyle='-', linewidth=2)
        NTz_First parameter to grid() is false, but line properties are supplied. The grid will be enabled.r�r�rr�rr�r#r�rr�)	rr�lowerrqrGrmr�rlr)rXr)r�rZr[rv�gridkws       rbr�z	Axis.grids��,�������"�"�$;�<������
�����5�U�C�;A�<�<�>�J�K�D�%�E�$��.�%�'�J��J��%�%�#*�?�%)�$7�$7��$A� A�8?�
�8�� �D� � �9�w�9�&�9��%�%�#*�?�%)�$7�$7��$A� A�8?�
�8�� �D� � �9�w�9�&�9���
��Ks�Cc�,�tjj|�}|�y|j|k7}||_|jj	||�}|�%|j
�|j
|�d|_y|r|j�d|_y)z�
        Introspect *data* for units converter and update the
        ``axis.converter`` instance if necessary. Return *True*
        if *data* is registered for unit conversion.
        FT)	�munits�registry�
get_converterr��
default_unitsr_r��_update_axisinfor)rXr�r��neednewrks     rb�update_unitszAxis.update_units<s����O�O�1�1�$�7�	�����.�.�I�-��"����.�.�.�.�t�T�:����4�:�:�#5��N�N�7�#���
����!�!�#���
�ric���|j�y|jj|j|�}|�y|j�Q|jj
|jk7r.|jr"|j|j�d|_|j�Q|jj
|jk7r.|jr"|j|j�d|_
|j�Q|jj|jk7r.|jr"|j|j�d|_|j �Q|jj|j k7r.|j"r"|j%|j �d|_|j&�.|j(r"|j+|j&�d|_|j-�y)zt
        Check the axis converter for the stored units to see if the
        axis info needs to be updated.
        NT)r��axisinfor_�majlocrr:rr�set_major_locator�minlocr#r��set_minor_locator�majfmtrArz�set_major_formatter�minfmtr��set_minor_formatterrhre�set_label_textr�)rXr�s  rbr�zAxis._update_axisinfoQss��
�>�>�!���~�~�&�&�t�z�z�4�8���<���;�;�"��:�:������,��1F�1F��"�"�4�;�;�/�$(�D�!��;�;�"��:�:������,��1F�1F��"�"�4�;�;�/�$(�D�!��;�;�"��:�:���4�;�;�.�4�3H�3H��$�$�T�[�[�1�$(�D�!��;�;�"��:�:���4�;�;�.�4�3H�3H��$�$�T�[�[�1�$(�D�!��:�:�!�d�&:�&:�����
�
�+�#'�D� ��"�"�$ric�>�|jduxs|jduSrf)r�r_rgs rb�
have_unitszAxis.have_unitsss���~�~�T�)�C�T�Z�Z�t�-C�Cric�T�tj|�r|S|j�$tjj	|�|_|j�|S	|jj||j|�}|S#t$r}tjd|���|�d}~wwxYw)Nz*Failed to convert value(s) to axis units: )	r��_is_natively_supportedr�r�r�rr_�	Exception�ConversionError)rXr��ret�es    rbrzAxis.convert_unitsvs����(�(��+��H��>�>�!�#�_�_�:�:�1�=�D�N��>�>�!��H�	A��.�.�(�(��D�J�J��=�C��
���	A��(�(�*3�34�%�*9�:�?@�
A��	A�s�'B�	B'�	B"�"B'c	���||jk(ry|jjj�D]W\}}||us�|jj|j|j�D�cgc]}t
||�d����}}n|g}|D]V}||_|j�|jjd�|jjd�d|_
�Xycc}w)z�
        Set the units for axis.

        Parameters
        ----------
        u : units tag

        Notes
        -----
        The units of any shared axis will also be updated.
        Nr�r_r`T)r_r:r�rGr�r��getattrr�rgr	r)rX�ur[r�r�shareds      rbr�zAxis.set_units�s���
��
�
�?���)�)�-�-�3�3�5�	�J�D�$��t�|��y�y�-�-�d�3�@�@����K�M���B�4�&��
�.�M��M��
	��V�F��	�D��D�J��!�!�#��N�N�"�"�7�+��N�N�"�"�#3�4��D�J�	��Ms�4C.c��|jS)zReturn the units for axis.)r_rgs rb�	get_unitszAxis.get_units�rOric���d|_|jj|�|�|jj|�|jj|�d|_|jS)z�
        Set the text value of the axis label.

        Parameters
        ----------
        label : str
            Text string.
        fontdict : dict
            Text properties.
        **kwargs
            Merged into fontdict.
        FT)rerhr�r�r)rXrh�fontdictrZs    rbr�zAxis.set_label_text�sY�� %����
�
���E�"����J�J���h�'��
�
���&�!���
��z�z�ric�<�|j||j�y)a�
        Set the formatter of the major ticker.

        In addition to a `~matplotlib.ticker.Formatter` instance,
        this also accepts a ``str`` or function.

        For a ``str`` a `~matplotlib.ticker.StrMethodFormatter` is used.
        The field used for the value must be labeled ``'x'`` and the field used
        for the position must be labeled ``'pos'``.
        See the  `~matplotlib.ticker.StrMethodFormatter` documentation for
        more information.

        For a function, a `~matplotlib.ticker.FuncFormatter` is used.
        The function must take two inputs (a tick value ``x`` and a
        position ``pos``), and return a string containing the corresponding
        tick label.
        See the  `~matplotlib.ticker.FuncFormatter` documentation for
        more information.

        Parameters
        ----------
        formatter : `~matplotlib.ticker.Formatter`, ``str``, or function
        N)�_set_formatterrrEs  rbr�zAxis.set_major_formatter�s��0	
���I�t�z�z�2ric�<�|j||j�y)aZ
        Set the formatter of the minor ticker.

        In addition to a `~matplotlib.ticker.Formatter` instance,
        this also accepts a ``str`` or function.
        See `.Axis.set_major_formatter` for more information.

        Parameters
        ----------
        formatter : `~matplotlib.ticker.Formatter`, ``str``, or function
        N)r�r#rEs  rbr�zAxis.set_minor_formatter�s��	
���I�t�z�z�2ric�`�t|t�rtj|�}n`t	|�r0t|tj
�stj|�}n%tjtj|��t|tj�rQt|j�dkDr9t|jtj�stjd�||j k(rd|_nd|_||_|j)|�d|_y)N)rArz=FixedFormatter should only be used together with FixedLocatorFT)rmrnr<�StrMethodFormatter�callable�
TickHelper�
FuncFormatterr�check_isinstancerD�FixedFormatterr�seqr:�FixedLocatorrrrzr�rA�set_axisr)rXrA�levels   rbr�zAxis._set_formatter�s����i��%��2�2�9�=�I��y�!��Y��(:�(:�;��-�-�i�8�I��!�!�'�"3�"3�y�I��y�'�"8�"8�9��	�
�
�&��*�"�5�=�=�'�2F�2F�G���� 3�
4��D�J�J��$)�D�!�$)�D�!�#������4� ���
ric�$�tjtj|��d|_||j
_|j
jr%|j
jj|�|j|�d|_
y)z�
        Set the locator of the major ticker.

        Parameters
        ----------
        locator : `~matplotlib.ticker.Locator`
        �r:FTN)rr�r<r=rrrr:rA�_set_locatorr�rr?s  rbr�zAxis.set_major_locator�f��	
���g�o�o�w�?� %���$��
�
���:�:����J�J� � �-�-�g�6��������
ric�$�tjtj|��d|_||j
_|j
jr%|j
jj|�|j|�d|_
y)z�
        Set the locator of the minor ticker.

        Parameters
        ----------
        locator : `~matplotlib.ticker.Locator`
        r�FTN)rr�r<r=r�r#r:rAr�r�rr?s  rbr�zAxis.set_minor_locatorr�ric�R�t|t�r|dkrtd��||_y)z�
        Set the depth of the axis used by the picker.

        Parameters
        ----------
        pickradius : float
            The acceptance radius for containment tests.
            See also `.Axis.contains`.
        rz pick radius should be a distanceN)rmrr�rS)rXr]s  rb�set_pickradiuszAxis.set_pickradius s(���*�f�-��a���?�@�@�%��rizGThe acceptance radius for containment tests. See also `.Axis.contains`.c�&�|j|d�S)Nr-)r�)�tickdr��poss   rb�_format_with_dictzAxis._format_with_dict3s���y�y��B��ric���	|D�cgc] }t|d�r|j�n|��"}}|r|j�n|j	�}t|tj�r�t|j�t|�k7r<t|�dk7r.tdt|j��dt|��d���t|j|�D��cic]\}}||��
}}}tj|j|�}	t
j|	�}
nt
j |�}
|r<|j#|
�|j%�}|j't|��}n;|j)|
�|j+�}|j-t|��}g}
t/t||��D]�\}\}}|j1|�|
||�}|j2j5|�|j2j7|�|j8j5|�|j8j7|�|j2j;�r|
j=|j2�|j8j;�s��|
j=|j8���d	|_|
Scc}w#t$rt|d�d��d�wxYwcc}}w)
a�
        [*Discouraged*] Set the text values of the tick labels.

        .. admonition:: Discouraged

            The use of this method is discouraged, because of the dependency
            on tick positions. In most cases, you'll want to use
            ``set_[x/y]ticks(positions, labels)`` instead.

            If you are using this method, you should always fix the tick
            positions before, e.g. by using `.Axis.set_ticks` or by explicitly
            setting a `~.ticker.FixedLocator`. Otherwise, ticks are free to
            move and the labels may end up in unexpected positions.

        Parameters
        ----------
        ticklabels : sequence of str or of `.Text`\s
            Texts for labeling each tick location in the sequence set by
            `.Axis.set_ticks`; the number of labels must match the number of
            locations.
        minor : bool
            If True, set minor ticks instead of major ticks.
        **kwargs
            Text properties.

        Returns
        -------
        list of `.Text`\s
            For each tick, includes ``tick.label1`` if it is visible, then
            ``tick.label2`` if it is visible, in that order.
        r��=z must be a sequenceNrz&The number of FixedLocator locations (zN), usually from a call to set_ticks, does not match the number of ticklabels (z).T) �hasattrr�r>r�r�rmr<r�r�locsr�r$�	functools�partialr�r�r�r�r%r�r�r!r��	enumeraterWrSr��_internal_updaterTr�rNr)rX�
ticklabelsr#rZ�tr:rY�labr��funcrAr�r.r�r�rR�
tick_labels                 rb�set_ticklabelszAxis.set_ticklabels7s���@	L�#-�/��+2�!�Z�*@�!�*�*�,�a�G�/�J�/�05�4�)�)�+��.�.�0�	��g�w�3�3�4��7�<�<� �C�
�O�3��J��1�8L� ���W�\�\�*�+�,2�25�j�/�1B�"�F�G�G�
/2�'�,�,�
�.K�L�(�#�s�S�#�X�L�E�L��$�$�T�%;�%;�U�C�D��-�-�d�3�I��.�.�z�:�I���$�$�Y�/��)�)�+�D��(�(��T��3�E��$�$�Y�/��)�)�+�D��(�(��T��3�E��� )�#�d�E�*:� ;�
	(��C��#�t�� � ��%�"�3��,�J��K�K� � ��,��K�K�(�(��0��K�K� � ��,��K�K�(�(��0��{�{�&�&�(��
�
�4�;�;�'��{�{�&�&�(��
�
�4�;�;�'�
	(���
��
��_/���	L��z�!�n�,?�@�A�t�K�	L��Ms!�K�%K�K�
K1�K�K.)r�r#c�R�|�|j|�|j|fd|i|��S)a�
        Set this Axis' labels with list of string labels.

        .. warning::
            This method should only be used after fixing the tick positions
            using `.Axis.set_ticks`. Otherwise, the labels may end up in
            unexpected positions.

        Parameters
        ----------
        labels : list of str
            The label texts.

        fontdict : dict, optional
            A dictionary controlling the appearance of the ticklabels.
            The default *fontdict* is::

               {'fontsize': rcParams['axes.titlesize'],
                'fontweight': rcParams['axes.titleweight'],
                'verticalalignment': 'baseline',
                'horizontalalignment': loc}

        minor : bool, default: False
            Whether to set the minor ticklabels rather than the major ones.

        Returns
        -------
        list of `.Text`
            The labels.

        Other Parameters
        ----------------
        **kwargs : `~.text.Text` properties.
        r#)r�r�)rX�labelsr�r#rZs     rb�_set_ticklabelszAxis._set_ticklabels�s4��F���M�M�(�#�"�t�"�"�6�A��A�&�A�Aric	��|j|�}|jjj�D]W\}}||us�|jj|j|j�D�cgc]}t
||�d����}}n|g}t|�r+|D]&}|jt|�t|���(d|j_|r>|jtj|��|jt|��S|j!tj|��|j#t|��Scc}w)Nr�T)rr:r�rGr�r�r�rr��minrGrr�r<r�r�r�r�)rXr.r#r[r�rr�s       rb�_set_tick_locationszAxis._set_tick_locations�s<���"�"�5�)���)�)�-�-�3�3�5�	�J�D�$��t�|��y�y�-�-�d�3�@�@����K�M���B�4�&��
�.�M��M��
	��V�F��u�:��
?���&�&�s�5�z�3�u�:�>�
?���	�	����"�"�7�#7�#7��#>�?��'�'��E�
�3�3��"�"�7�#7�#7��#>�?��'�'��E�
�3�3��#Ms�5Ec�Z�|j||��}|�|j|fd|i|��|S)ah
        Set this Axis' tick locations and optionally labels.

        If necessary, the view limits of the Axis are expanded so that all
        given ticks are visible.

        Parameters
        ----------
        ticks : list of floats
            List of tick locations.  The axis `.Locator` is replaced by a
            `~.ticker.FixedLocator`.

            Some tick formatters will not label arbitrary tick positions;
            e.g. log formatters only label decade ticks by default. In
            such a case you can set a formatter explicitly on the axis
            using `.Axis.set_major_formatter` or provide formatted
            *labels* yourself.
        labels : list of str, optional
            List of tick labels. If not set, the labels are generated with
            the axis tick `.Formatter`.
        minor : bool, default: False
            If ``False``, set the major ticks; if ``True``, the minor ticks.
        **kwargs
            `.Text` properties for the labels. These take effect only if you
            pass *labels*. In other cases, please use `~.Axes.tick_params`.

        Notes
        -----
        The mandatory expansion of the view limits is an intentional design
        choice to prevent the surprise of a non-visible tick. If you need
        other limits, you should set the limits explicitly after setting the
        ticks.
        ryr#)r�r�)rXr.r�r#rZ�results      rb�	set_tickszAxis.set_ticks�s?��D�)�)�%�u�)�=�����D����>�e�>�v�>��
ric��|jjj�D��cgc]#\}}||jjvr||ur|��%}}}t|�dk7rggfS|\}|jj|}g}g}|j
|j�D]X}	t|	|�d��}|j�}
|j|
|�\}}|j|�|j|��Z||fScc}}w)z�
        Get the bounding boxes for this `.axis` and its siblings
        as set by `.Figure.align_xlabels` or  `.Figure.align_ylabels`.

        By default, it just gets bboxes for *self*.
        r1r�)r:r�rGr9�_align_label_groupsrr�r�rr�extend)
rXr�r[r��
axis_namesr=�grouperrC�bboxes2rr�tlbrs
             rb�_get_tick_boxes_siblingszAxis._get_tick_boxes_siblings�s��$(�9�9�#6�#6�#<�#<�#>�I��T�4��t�{�{�6�6�6�4�4�<�
�I�
�I��z�?�a���r�6�M��
�	��+�+�1�1�)�<�������&�&�t�y�y�1�	!�B��2�)��D�1�2�D� �.�.�0�M��2�2�=�(�K�I�C���M�M�#���N�N�4� �	!��w����!Is�(Dc��td��)zz
        Update the label position based on the bounding box enclosing
        all the ticklabels and axis spine.
        r�r�)rXr�s  rbr:zAxis._update_label_position
���
"�"9�:�:ric��td��)zx
        Update the offset text position based on the sequence of bounding
        boxes of all the ticklabels.
        r�r�)rXrCr�s   rbr;z!Axis._update_offset_text_positionr�ric��t|t�rddl}|jj	|�}|jt
jddddddd|��y)z�
        Set up axis ticks and labels to treat data along this Axis as dates.

        Parameters
        ----------
        tz : str or `datetime.tzinfo`, default: :rc:`timezone`
            The timezone used to create date labels.
        rNi�r1)rmrn�dateutil.tz�tz�gettzr��datetime)rXr��dateutils   rb�	axis_datezAxis.axis_datesL���b�#������"�"�2�&�B����(�+�+�D�!�Q��1�a��B�G�Hric��t��)z>Return the estimated number of ticks that can fit on the axis.r�rgs rb�get_tick_spacezAxis.get_tick_space,s
��"�#�#ric��|jd}|jd}td�||fD��rytd�||fD��rytd�||fD��ryy)	a[
        Helper for `XAxis.get_ticks_position` and `YAxis.get_ticks_position`.

        Check the visibility of tick1line, label1, tick2line, and label2 on
        the first major and the first minor ticks, and return

        - 1 if only tick1line and label1 are visible (which corresponds to
          "bottom" for the x-axis and "left" for the y-axis);
        - 2 if only tick2line and label2 are visible (which corresponds to
          "top" for the x-axis and "right" for the y-axis);
        - "default" if only tick1line, tick2line and label1 are visible;
        - "unknown" otherwise.
        rc3�K�|]t}|jj�xrT|jj�xr7|jj�xr|jj����vy�wrf�rHr�rIrSrT�r�rRs  rbr�z+Axis._get_ticks_position.<locals>.<genexpr>Ass����+��	�~�~�)�)�+�1��~�~�1�1�3�3�1��;�;�*�*�,�1��{�{�.�.�0�0�1�+���A:A<r1c3�K�|]t}|jj�xrT|jj�xr7|jj�xr|jj����vy�wrf)rIr�rHrTrSrs  rbr�z+Axis._get_ticks_position.<locals>.<genexpr>Gss����-��	���+�+�-�3����3�3�5�5�3��[�[�,�,�.�3����0�0�2�2�3�-�rr9c3�K�|]s}|jj�xrS|jj�xr7|jj�xr|jj����uy�wrfrrs  rbr�z+Axis._get_ticks_position.<locals>.<genexpr>Msp����-��	���+�+�-�3��^�^�/�/�1�3��[�[�,�,�.�3����0�0�2�2�3�-�s�A9A;rk�unknown)rLrO�all)rXrr#s   rb�_get_ticks_positionzAxis._get_ticks_position1s�������"������"���+�"�5�>�	+�+�
�
�-�$�U�^�	-�-�
�
�-�$�U�^�	-�-�
�ric��|jS)z;
        Return the label position (top or bottom)
        )�label_positionrgs rb�get_label_positionzAxis.get_label_positionVs���"�"�"ric��t��)��
        Set the label position (top or bottom)

        Parameters
        ----------
        position : {'top', 'bottom'}
        r��rX�positions  rb�set_label_positionzAxis.set_label_position\s
��"�#�#ric��t��rfr�rgs rbr�zAxis.get_minposfs��!�#�#ri)�rf)rF�F)FN)Nr)pr=r�r�r��
OFFSETTEXTPADr�r\r�make_keyword_onlyr5r�rrrFrzr�r�rHrLrOr�r�rqr�r�r�r�r�r�r�r�r�r�r�rnr�r��staticmethodr�r�r�r�r�r�r�r�r�r�rVr�rrrrEryr�r�r�rLrNrQrTrYr]r_rdrgrjr!r%r{r~rMr�r�r�r�r�r�r�r�r��rename_parameterr�r�r�r�rr�r�r�r�r�r�r�r�r�r]r�r�r�r�r�r�r:r;rrr
rrr�r�r�s@rbrUrUas�����:�M��K�I��T���E��5�,"�6�,"�\�.��.����/��/��0��0����1��1��.��.����/��/��0��0����1��1��T�*�J��U�+�J�-�2�'�#�%@�3�5��
�(+� �
%�)K�VP�"�	�B�F�F�"�H�(%�N�3��3�j�;�
;�;�;�	�
J��(,�I�V"�
�T�_�_�U�����)�VB�1�e�1�f&�
� � ��!��8D��� �!�!�*�><�<�)�$��$%*�O�&D�*F�
D�0�%�"�"�$�$�*�*��T���5�#�y�1�(�2�(�T�* %�DD��"�<��*3�43��4� � &����-8�9�J�
� �� �38�P�h37�e�%B�N38�4�4%�U�%�N�4;�;�I�"$�
#�J#�$�$rirUc�\�������fd��d����fd�	�d|�d��_d|�d��_��fS)zo
    Helper to generate ``get_{data,view}_interval`` and
    ``set_{data,view}_interval`` implementations.
    c�D��tt|j����Srf)r�r:)rX�	attr_name�lim_names ��rb�getterz%_make_getset_interval.<locals>.getterps����w�t�y�y�(�3�Y�?�?ric	�&��|r+tt|j���||f�d|_y�|�\}}||kr*�	|t|||�t	|||�d��d|_y�	|t	|||�t|||�d��d|_y)NTr)r�r�r:r�rGr)
rXr�r�r��oldmin�oldmaxrr!r rFs
      ����rbrFz%_make_getset_interval.<locals>.setterts������G�D�I�I�x�0�)�d�D�\�J���
�$�D�\�N�F�F�����t�S��t�V�4�c�$��f�6M�"�$�
��
��t�S��t�V�4�c�$��f�6M�"�$���
ri�get_�	_interval�set_r)r=)�method_namer rr!rFs ``@@rb�_make_getset_intervalr)js?���@����[�M��3�F�O��[�M��3�F�O��6�>�ric����eZdZdZdZeZ�fd�Zd�Zd�Zd�Z	d�Z
ejd�d	��Z
d
�Zd�Zd�Zd
�Zeddd�\ZZeddd�\ZZd�Zd�Zd�Z�xZS)�XAxis�xaxisr�c����t�|�|i|��|jjddddt	j
|jjt	j����d|_	|jjddddt	j
|jjt	j��tjd	tjd
��d|_
y)Nr�rr��centerr�r�r1r�zxtick.labelsizezxtick.color�r�r�r�rr�r2r)r4r5rhr�r�blended_transform_factoryr:r[�IdentityTransformrrir6r7�offset_text_position�rXrrZras   �rbr5zXAxis.__init__�s����
���$�)�&�)�	
�
�
����Q�#��!�;�;��	�	�#�#�[�%B�%B�%D�F�	�	
�'���������1�#��!�;�;��	�	�#�#�[�%B�%B�%D�F��\�\�"3�4��,�,�}�-�
	�	
�%-��!ric��|j|�\}}|�||fS|j|j}}	|jjj�}|j
||f�\}}|jjj
ddg�\\}	}
\}}d|cxkxrdkncxr<|
|jz
|cxkxr|
kncxs||cxkxr||jzknc}
|
ifS#t$rdifcYSwxYw)z4Test whether the mouse event occurred in the x-axis.FrX�r1r1rr1�	r�r�r�r:r[r�r�r�rS�rXr�r�r�r�r�r��xaxes�yaxes�lr��rr��inaxiss              rbr�zXAxis.contains�����-�-�j�9�������4�<���|�|�Z�\�\�1��	��I�I�'�'�0�0�2�E� �?�?�A�q�6�2�L�E�5����,�,�6�6���7G�H����A���A��e��q��*�
�� � � �1�(�q�(�
)�
��(�A��(�(�(�(�	��r�z���
�	��"�9��	���:C0�0
D�?Dc��|jjtjddd�|���||_d|_y)r�baseliner�)r�r��rTN)rh�set_verticalalignmentr�
check_getitemrrrs  rbrzXAxis.set_label_position�sA��	
�
�
�(�(��);�);���=
��*�	�'�����
ric��|jsy|j|��\}}|jj�\}}|jdk(r�	|j
jd}|j�}tjj||gz�}|j}	|jj||	|j|j j"zdzz
f�y	|j
jd}|j�}tjj||gz�}|j$}
|jj||
|j|j j"zdzzf�y#t$r|j
j}Y��4wxYw#t$r|j
j}Y��wxYw)�y
        Update the label position based on the bounding box enclosing
        all the ticklabels and axis spine
        N�r�r�r�r�)rhr�rh�get_positionrr:�spinesr5�KeyError�bboxrrrrAr�rjr9r�rB)rXr�rCr�r�r��spine�	spinebboxrJr�r�s           rbr:zXAxis._update_label_position�s���
�!�!���7�7��7�J�����z�z�&�&�(���1����(�*�
+��	�	�(�(��2��!�3�3�5�	��#�#�)�)�&�I�;�*>�?�D��W�W�F��J�J�#�#��F�T�]�]�T�[�[�_�_�<�r�A�A�B�
�
+��	�	�(�(��/��!�3�3�5�	��#�#�)�)�'�Y�K�*?�@�D��'�'�C��J�J�#�#��C�$�-�-�$�+�+�/�/�9�B�>�>�?�
��'�
+� �I�I�N�N�	�
+���
+� �I�I�N�N�	�
+��$�)F�.)F1�F.�-F.�1G�Gc��|jj�\}}t|d�sd|_|jdk(r�t	|�s!|j
jj}n+tjj|�}|j}||j|jjzdzz
}n�t	|�s!|j
jj}n+tjj|�}|j }||j|jjzdzz}|jj#||f�y)�w
        Update the offset_text position based on the sequence of bounding
        boxes of all the ticklabels
        �_tick_positionr�r�N)rirGr�rPrr:rJ�yminrrrrArr9r��ymaxrBr�)rXrCr�r�r�r�rJr�s        rbr;z"XAxis._update_offset_text_position�s��
���+�+�-���1��t�-�.�"*�D�����(�*��v�;������,�,��"�'�'�-�-�f�5��������+�+�d�k�k�o�o�=��B�B�A��w�<��i�i�n�n�)�)��"�'�'�-�-�g�6���g�g���d�(�(�4�;�;�?�?�:�R�?�?�A����$�$�a��V�,rir�c���|j|�\}}|jdj�}d}|jr||j|zz
}d}|jr||j|zz
}|j	�dk(r/||j
j
|�j|zz
}||fS||j
j
|�j|zz
}||fS)zz
        Return how much space should be reserved for text above and below the
        Axes, as a pair of floats.
        rr�r�)rrLr�r@rrhr5)rXr�rJr�
pad_pixels�above�belows       rb�get_text_heightszXAxis.get_text_heights	s����0�0��:���e��_�_�Q�'�6�6�8�
����<�<��U�\�\�J�.�.�E����;�;��T�[�[�:�-�-�E��"�"�$��-��T�Z�Z�1�1�(�;�B�B�Z�O�O�E��e�|��
�T�Z�Z�1�1�(�;�B�B�Z�O�O�E��e�|�ric�d�tjgd�|��|dk(r@|jddddd��d|_|jjd�d|_y
|dk(r@|jddddd��d|_|jjd�d|_y
|dk(r|jddd�	�d|_y
|d
k(r|jddd�	�d|_y
|dk(r@|jddddd��d|_|jjd�d|_y
Jd��)a�
        Set the ticks position.

        Parameters
        ----------
        position : {'top', 'bottom', 'both', 'default', 'none'}
            'both' sets the ticks to appear on both positions, but does not
            change the tick labels.  'default' resets the tick positions to
            the default: ticks on both positions, labels at bottom.  'none'
            can be used if you don't want any ticks. 'none' and 'both'
            affect only the ticks, not the labels.
        )r�r�r rkr'rAr�r TF)r�r�r�r�r�r�)r�r�r�r'rk�0unhandled parameter not caught by _check_in_listN)rrqr�rPrirBrrs  rb�set_ticks_positionzXAxis.set_ticks_position	sb��	
���G�$,�	.��u��� � �v�4�$�(-�5�
!�
B�"'�D���O�O�1�1�(�;�&��
�%��
!�� � �v�5�5�(,�$�
!�
@�"*�D���O�O�1�1�%�8���
���
�� � �v�4�(,�
!�
.���
���
�� � �v�5�(-�
!�
/���
���
"�� � �v�4�%�(,�$�
!�
@�"*�D���O�O�1�1�%�8���
�
M�L�L�5ric��d}d|jvr |jdxs|jd}|jd�|jd|��y)zP
        Move ticks and ticklabels (if present) to the top of the Axes.
        Trrr�r )r�r�N�rlrZr��rXrhs  rb�tick_topzXAxis.tick_topA	s^������,�,�,��(�(��4�8��+�+�J�7�
�����&����6�E��:ric��d}d|jvr |jdxs|jd}|jd�|jd|��y)zS
        Move ticks and ticklabels (if present) to the bottom of the Axes.
        Trrr�r )r�r�Nr\r]s  rb�tick_bottomzXAxis.tick_bottomM	s^������,�,�,��(�(��4�8��+�+�J�7�
�����)����6�u��=ric�2�ddddd�|j�S)zW
        Return the ticks position ("top", "bottom", "default", or "unknown").
        r�r�rkr�r1r9rkr�r
rgs rb�get_ticks_positionzXAxis.get_ticks_positionY	s)����$��<��,�,�.�0�	0ri�viewrrr��dataLimc�B�|jjjSrf)r:rf�minposxrgs rbr�zXAxis.get_minposf	����y�y� � �(�(�(ric��|jjj�s�|jjj�sy|j�m|jj|j|�}|j�;|j|j�\}}||f|jj_	d|_
yr~)r:rf�mutatedxrr�r�r_�default_limitsrrr)rXr��xmin�xmaxs    rbr�zXAxis.set_default_intervalsi	����	�	�!�!�*�*�,��I�I�%�%�.�.�0��~�~�)��~�~�.�.�t�z�z�4�@���&�&�2�!%�!3�!3�D�4G�4G�!H�J�D�$�26��*�D�I�I�%�%�/���
ric�F�tjj�j|jj
|jjz
�}|jdz}|jd�dz}|dkDr!ttj||z��Sy)Nr�r�rVr��)
rr�unit�transformedr:r[r9�dpi_scale_transrr��intrP�floor�rX�endsr�r
s    rbrzXAxis.get_tick_spacev	s������$�$�&�2�2��I�I���$�+�+�"=�"=�=�?�����b����(�(��-��1���!�8��r�x�x���
�.�/�/�ri)r=r�r�r=r�r�r5r�rr:r;rr�rWrZr^r`rdr)r�r�r�r�r�r�rr�r�s@rbr+r+�s�����H��I��K�-�*�$�&�P-�0�T�_�_�U�����,&�P
;�
>�0�,A��	�;�,(�(��(�+@��	�;�,(�(��(�)��
rir+c����eZdZdZdZeZ�fd�Zd�Zd�Zd�Z	d�Z
d�Zejd	�d
��Zd�Zd�Zd
�Zd�Zeddd�\ZZeddd�\ZZd�Zd�Zd�Z�xZS)�YAxis�yaxisr�c����t�|�|i|��|jjddddddt	j
t	j�|jj���d|_	|jjddd	dt	j
|jjt	j��tjd
tjd��d|_
y)
Nrr�r�r.�vertical�anchor)r�r�r�rr3�
rotation_moder�r�r@zytick.labelsizezytick.colorr/)r4r5rhr�rr0r1r:r[rrir6r7r2r3s   �rbr5zYAxis.__init__�	s����
���$�)�&�)�	
�
�
����3�&�H��x�!�;�;��-�-�/����1D�1D�F�		�	
�%���������3�(�f�!�;�;��	�	�#�#�[�%B�%B�%D�F��\�\�"3�4��,�,�}�-�
	�	
�%+��!ric��|j|�\}}|�||fS|j|j}}	|jjj�}|j
||f�\}}|jjj
ddg�\\}	}
\}}d|cxkxrdkncxr<|	|jz
|cxkxr|	kncxs||cxkxr||jzknc}
|
ifS#t$rdifcYSwxYw)NFrXr5rr1r6r7s              rbr�zYAxis.contains�	r=r>c��|jjd�|jjtjddd�|���||_d|_y)z�
        Set the label position (left or right)

        Parameters
        ----------
        position : {'left', 'right'}
        r~r�r��r�r�rATN)rh�set_rotation_moderBrrCrrrs  rbrzYAxis.set_label_position�	sS��	
�
�
�$�$�X�.��
�
�(�(��);�);��u�=
��*�	�'�����
ric��|jsy|j|��\}}|jj�\}}|jdk(r�	|j
jd}|j�}tjj||gz�}|j}	|jj|	|j|j j"zdzz
|f�y	|j
jd}|j�}tjj||gz�}|j$}
|jj|
|j|j j"zdzz|f�y#t$r|j
j}Y��4wxYw#t$r|j
j}Y��wxYw)rENrFr�r�r�)rhr�rhrGrr:rHr5rIrJrrrr>r�rjr9r�r?)rXr�rCr�r�r�rKrLrJr�r�s           rbr:zYAxis._update_label_position�	s���
�!�!���7�7��7�J�����z�z�&�&�(���1����&�(�
+��	�	�(�(��0��!�3�3�5�	��#�#�)�)�&�I�;�*>�?�D��7�7�D��J�J�#�#���
�
������7�"�<�<�a�@�
�

+��	�	�(�(��1��!�3�3�5�	�
�#�#�)�)�'�Y�K�*?�@�D��G�G�E��J�J�#�#����������8�2�=�=�q�A�
��'�
+� �I�I�N�N�	�
+���
+� �I�I�N�N�	�
+�rMc��|jj�\}}d|jjvr(|jjdj	�}n|jj
}|j}|jj|||j|jjzdzzf�y)rO�outliner�N)rirGr:rHr5rJrRr�rr9r�)rXrCr�r�r�rJr�s       rbr;z"YAxis._update_offset_text_position�	s���
���+�+�-���1���	�	�(�(�(��9�9�#�#�I�.�@�@�B�D��9�9�>�>�D��i�i�����$�$�
��d�(�(�4�;�;�?�?�:�R�?�?�@�	
ric���|jj�\}}tjddd�|��}|jj	|�|jj||f�d|_y)zT
        Parameters
        ----------
        position : {'left', 'right'}
        rr1r�rATN)rirGrrC�set_har�r)rXrr�r�s    rb�set_offset_positionzYAxis.set_offset_position�	s`�����+�+�-���1�����A�6��J�������x�(����$�$�a��V�,���
rir�c���|j|�\}}|jdj�}d}|jr||j|zz
}d}|jr||j|zz
}|j	�dk(r/||j
j
|�j|zz
}||fS||j
j
|�j|zz
}||fS)Nrr�r�)rrLr�rrrhr5)rXr�rJrrTr�r�s       rb�get_text_widthszYAxis.get_text_widths
s����0�0��:���e��_�_�Q�'�6�6�8�
����:�:��D�J�J��+�+�D����;�;��U�[�[�:�-�-�E��"�"�$��.��D�J�J�0�0��:�@�@�:�M�M�D��U�{��
�T�Z�Z�1�1�(�;�A�A�J�N�N�E��U�{�ric���tjgd�|��|dk(r/|jddddd��|j|�d|_y
|dk(r/|jddddd��|j|�d|_y
|dk(r|jddd�	�d|_y
|d
k(r|jddd�	�d|_y
|dk(r|jddddd��d|_y
Jd��)a�
        Set the ticks position.

        Parameters
        ----------
        position : {'left', 'right', 'both', 'default', 'none'}
            'both' sets the ticks to appear on both positions, but does not
            change the tick labels.  'default' resets the tick positions to
            the default: ticks on both positions, labels at left.  'none'
            can be used if you don't want any ticks. 'none' and 'both'
            affect only the ticks, not the labels.
        )r�r�r rkr'rAr�r TF)r�r�r�r�r�r�)r�r�r�r'rkrYN)rrqr�r�rrs  rbrZzYAxis.set_ticks_position
s-��	
���G�$,�	.��w��� � �v�T�d�&+�u�
!�
>��$�$�X�.� ��
���
�� � �v�U�u�&*�d�
!�
<��$�$�X�.���
���
�� � �v�T�&*�
!�
,���
���
�� � �v�U�&+�
!�
-���
���
"�� � �v�T�e�&*�d�
!�
<���
�
M�L�L�5ric��d}d|jvr |jdxs|jd}|jd�|jd|��y)zR
        Move ticks and ticklabels (if present) to the right of the Axes.
        Trrr�r )r�r�Nr\r]s  rb�
tick_rightzYAxis.tick_right;
s`������,�,�,��(�(��4�8��+�+�J�7�
�����(�	
���6�e��<ric��d}d|jvr |jdxs|jd}|jd�|jd|��y)zQ
        Move ticks and ticklabels (if present) to the left of the Axes.
        Trrr�r )r�r�Nr\r]s  rb�	tick_leftzYAxis.tick_leftH
s`������,�,�,��(�(��4�8��+�+�J�7�
�����'�	
���6�U��;ric�2�ddddd�|j�S)zW
        Return the ticks position ("left", "right", "default", or "unknown").
        r�r�rkrrbrcrgs rbrdzYAxis.get_ticks_positionU
s)���g�$��<��,�,�.�0�	0rirerr1r�rfc�B�|jjjSrf)r:rf�minposyrgs rbr�zYAxis.get_minposb
riric��|jjj�s�|jjj�sy|j�m|jj|j|�}|j�;|j|j�\}}||f|jj_	d|_
yr~)r:rf�mutatedyrr�r�r_rlrr1r)rXr�rQrRs    rbr�zYAxis.set_default_intervalse
roric�F�tjj�j|jj
|jjz
�}|jdz}|jd�dz}|dkDr!ttj||z��Sy)Nr�r�r9rrq)
rrrrrsr:r[r9rtr@r�rurPrvrws    rbrzYAxis.get_tick_spacer
s������$�$�&�2�2��I�I���$�+�+�"=�"=�=�?�����r�!���(�(��-��1���!�8��r�x�x���
�.�/�/�ri)r=r�r�r=r"r�r5r�rr:r;r�rr�r�rZr�r�rdr)r�r�r�r�r�r�rr�r�s@rbrzrz�	s�����H��I��K�+�.�$
�%�N
� ��T�_�_�U�����$"�H=�<�0�,A��	�;�,(�(��(�+@��	�;�,(�(��(�)��	rirz)<r�r�r��logging�numbersr�numpyrP�
matplotlibr6rr�matplotlib.artistr`r��matplotlib.colorsr�rE�matplotlib.linesrcrB�matplotlib.scaler�r��matplotlib.text�textrN�matplotlib.ticker�tickerr<�matplotlib.transforms�
transformsr�matplotlib.unitsr_r��	getLoggerr=�_logrK�ArtistInspectorrC�_line_inspector�get_setters�_line_param_names�aliasdrHrp�_line_param_aliasesr��Artistr	r�r"r3rHrUr)r+rz)�dr[s00rb�<module>r�sK���������"�#�#�!�!��#�+�!��w����"��"��*�'�)�)�&�-�-�8��#�/�/�1��+:�+A�+A�+H�+H�+J�K�a�t�A�w�q�z�K��%6�9L�%L�N�!�!�4��N��w;�7�>�>�w;�t:+�D�:+�z:+�D�:+�z&$�&$�R+�+�@F$�7�>�>�F$�R0�<x�D�x�vx�D�x��IKL��Ns�1E
�
E

Youez - 2016 - github.com/yon3zu
LinuXploit