403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.37
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/scipy/spatial/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/scipy/spatial/__pycache__/_plotutils.cpython-311.pyc
�

d�c���ddlZddlmZgd�Zed	d���Zd�Zed	d���Zed	d���Z	ed	d���Z
dS)
�N)�	decorator)�delaunay_plot_2d�convex_hull_plot_2d�voronoi_plot_2dc�f�ddlm}|�3|���}|���}||fd|i|��St	|dd�����}|r||fd|i|��S	|�d��||fd|i|��|�|��S#|�|��wxYw)Nr�ax�isholdc��dS)NT�r��:/usr/lib/python3/dist-packages/scipy/spatial/_plotutils.py�<lambda>z_held_figure.<locals>.<lambda>s��T�rT)�matplotlib.pyplot�pyplot�figure�gca�getattr�hold)�func�objr�kw�plt�fig�was_helds       r
�_held_figurers���#�#�#�#�#�#�	�z��j�j�l�l��
�W�W�Y�Y���t�C�%�%�B�%�"�%�%�%�3�w�r�8�\�\�2�2�4�4�H��&��t�C�%�%�B�%�"�%�%�%��
����
�
�
��t�C�%�%�B�%�"�%�%�
�������������������s�$B�B0c�$�d|�d���z}|�d���|z
}|�d���|z}|�|d|d��|�|d|d��dS)Ng�������?r��axis�)�ptp�min�max�set_xlim�set_ylim)r�points�margin�xy_min�xy_maxs     r
�_adjust_boundsr)s���
�6�:�:�1�:�%�%�
%�F�
�Z�Z�Q�Z�
�
�&�
(�F�
�Z�Z�Q�Z�
�
�&�
(�F��K�K��q�	�6�!�9�%�%�%��K�K��q�	�6�!�9�%�%�%�%�%rc�,�|jjddkrtd���|jj\}}|�||d��|�|||j�����t||j��|j	S)aB
    Plot the given Delaunay triangulation in 2-D

    Parameters
    ----------
    tri : scipy.spatial.Delaunay instance
        Triangulation to plot
    ax : matplotlib.axes.Axes instance, optional
        Axes to plot on

    Returns
    -------
    fig : matplotlib.figure.Figure instance
        Figure for the plot

    See Also
    --------
    Delaunay
    matplotlib.pyplot.triplot

    Notes
    -----
    Requires Matplotlib.

    Examples
    --------

    >>> import numpy as np
    >>> import matplotlib.pyplot as plt
    >>> from scipy.spatial import Delaunay, delaunay_plot_2d

    The Delaunay triangulation of a set of random points:

    >>> rng = np.random.default_rng()
    >>> points = rng.random((30, 2))
    >>> tri = Delaunay(points)

    Plot it:

    >>> _ = delaunay_plot_2d(tri)
    >>> plt.show()

    r�z!Delaunay triangulation is not 2-D�o)
r%�shape�
ValueError�T�plot�triplot�	simplices�copyr)r)�trir�x�ys    r
rr$s���Z�z����a����<�=�=�=��:�<�D�A�q��G�G�A�q�#�����J�J�q�!�S�]�'�'�)�)�*�*�*��2�s�z�"�"�"�
�9�rc�d��ddlm}�jjddkrt	d���|��jdd�df�jdd�dfd���fd��jD��}|�||d	d
�����t|�j��|j	S)a&
    Plot the given convex hull diagram in 2-D

    Parameters
    ----------
    hull : scipy.spatial.ConvexHull instance
        Convex hull to plot
    ax : matplotlib.axes.Axes instance, optional
        Axes to plot on

    Returns
    -------
    fig : matplotlib.figure.Figure instance
        Figure for the plot

    See Also
    --------
    ConvexHull

    Notes
    -----
    Requires Matplotlib.


    Examples
    --------

    >>> import numpy as np
    >>> import matplotlib.pyplot as plt
    >>> from scipy.spatial import ConvexHull, convex_hull_plot_2d

    The convex hull of a random set of points:

    >>> rng = np.random.default_rng()
    >>> points = rng.random((30, 2))
    >>> hull = ConvexHull(points)

    Plot it:

    >>> _ = convex_hull_plot_2d(hull)
    >>> plt.show()

    r��LineCollectionrr+zConvex hull is not 2-DNr,c�*��g|]}�j|��Sr)r%)�.0�simplex�hulls  �r
�
<listcomp>z'convex_hull_plot_2d.<locals>.<listcomp>�s ���H�H�H�g�T�[��)�H�H�Hr�k�solid)�colors�	linestyle)
�matplotlib.collectionsr9r%r-r.r0r2�add_collectionr)r)r=rr9�
line_segmentss`   r
rr]s����Z6�5�5�5�5�5��{����q� � ��1�2�2�2��G�G�D�K����1���t�{�1�1�1�a�4�0�#�6�6�6�H�H�H�H���H�H�H�M����n�n�]�,/�/6�8�8�8�9�9�9��2�t�{�#�#�#�
�9�rc	��ddlm}|jjddkrt	d���|�dd��rM|�dd	��}|�|jd	d	�df|jd	d	�dfd
|���|�dd��r5|�|jd	d	�df|jd	d	�dfd
��|�dd��}|�dd��}|�dd��}|j�d���}|j�	d���}	g}
g}t|j|j��D�]p\}}
tj|
��}
tj|
dk��r!|
�|j|
���S|
|
dkd}|j|d|j|dz
}|tj�|��z}tj|d|dg��}|j|�d���}tjtj||z
|����|z}|jr|}|j|||	���zz}|�|j||g����r|�||
|||d�����|�|||||d�����t3||j��|jS)a;
    Plot the given Voronoi diagram in 2-D

    Parameters
    ----------
    vor : scipy.spatial.Voronoi instance
        Diagram to plot
    ax : matplotlib.axes.Axes instance, optional
        Axes to plot on
    show_points : bool, optional
        Add the Voronoi points to the plot.
    show_vertices : bool, optional
        Add the Voronoi vertices to the plot.
    line_colors : string, optional
        Specifies the line color for polygon boundaries
    line_width : float, optional
        Specifies the line width for polygon boundaries
    line_alpha : float, optional
        Specifies the line alpha for polygon boundaries
    point_size : float, optional
        Specifies the size of points

    Returns
    -------
    fig : matplotlib.figure.Figure instance
        Figure for the plot

    See Also
    --------
    Voronoi

    Notes
    -----
    Requires Matplotlib.

    Examples
    --------
    >>> import numpy as np
    >>> import matplotlib.pyplot as plt
    >>> from scipy.spatial import Voronoi, voronoi_plot_2d

    Create a set of points for the example:

    >>> rng = np.random.default_rng()
    >>> points = rng.random((10,2))

    Generate the Voronoi diagram for the points:

    >>> vor = Voronoi(points)

    Use `voronoi_plot_2d` to plot the diagram:

    >>> fig = voronoi_plot_2d(vor)

    Use `voronoi_plot_2d` to plot the diagram again, with some settings
    customized:

    >>> fig = voronoi_plot_2d(vor, show_vertices=False, line_colors='orange',
    ...                       line_width=2, line_alpha=0.6, point_size=2)
    >>> plt.show()

    rr8rr+zVoronoi diagram is not 2-D�show_pointsT�
point_sizeN�.)�
markersize�
show_verticesr,�line_colorsr?�
line_widthg�?�
line_alpharr@)rA�lw�alpharB�dashed)rCr9r%r-r.�getr0�vertices�meanr �zip�ridge_points�ridge_vertices�np�asarray�all�append�linalg�norm�array�sign�dot�
furthest_siter"rDr)r)�vorrrr9rHrLrMrN�center�	ptp_bound�finite_segments�infinite_segments�pointidxr<�i�t�n�midpoint�	direction�	far_points                    r
rr�sK��@6�5�5�5�5�5�
�z����a����5�6�6�6�	�v�v�m�T�"�"�P��V�V�L�$�/�/�
�
����
�1�1�1�a�4� �#�*�Q�Q�Q��T�"2�C�J��O�O�O�	�v�v�o�t�$�$�=�
�����Q�Q�Q��T�"�C�L����A��$6��<�<�<��&�&���,�,�K�����c�*�*�J�����c�*�*�J�
�Z�_�_�!�_�
$�
$�F��
���A��&�&�I��O��� ��!1�3�3E�F�F�C�C���'��*�W�%�%��
�6�'�Q�,���	C��"�"�3�<��#8�9�9�9�9���1��%�a�(�A��
�8�A�;�'�#�*�X�a�[�*A�A�A�
������"�"�"�A���1�Q�4�%��1���'�'�A��z�(�+�0�0�a�0�8�8�H�����x�&�'8�!� <� <�=�=��A�I��!�
'�&�J�	���Q��)�i�m�m�o�o�*E�E�I��$�$�c�l�1�o�y�%A�B�B�B�B����n�n�_�,7�(2�+5�/6�	8�8�8�9�9�9�
���n�n�%6�,7�(2�+5�/7�	9�9�9�:�:�:��2�s�z�"�"�"�
�9�r)N)�numpyrX�scipy._lib.decoratorr�
_decorator�__all__rr)rrrrrr
�<module>rrs�������8�8�8�8�8�8�
H�
H�
H���������(&�&�&��5�5�5���5�p�8�8�8���8�v�s�s�s���s�s�sr

Youez - 2016 - github.com/yon3zu
LinuXploit