Ë
    âQ(h…  ã                   ón   — d dl Zd dlmZ g d¢Zed	d„«       Zd„ Zed	d„«       Zed	d„«       Z	ed	d„«       Z
y)
é    N)Ú	decorator)Údelaunay_plot_2dÚconvex_hull_plot_2dÚvoronoi_plot_2dc                 ó0  — dd l m} |€+|j                  «       }|j                  «       } | |fd|i|¤ŽS  t	        |dd„ «      «       }|r | |fd|i|¤ŽS 	 |j                  d«        | |fd|i|¤Ž|j                  |«       S # |j                  |«       w xY w)Nr   ÚaxÚisholdc                   ó   — y)NT© r   ó    úV/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/scipy/spatial/_plotutils.pyú<lambda>z_held_figure.<locals>.<lambda>   s   � r   T)Úmatplotlib.pyplotÚpyplotÚfigureÚgcaÚgetattrÚhold)ÚfuncÚobjr   ÚkwÚpltÚfigÚwas_helds          r   Ú_held_figurer      s�   € å#à	€zØ�j‰j‹lˆØ�W‰W‹YˆÙ�CÑ%˜BÐ% "Ñ%Ð%ð 3Œw�r˜8¡\Ó2Ó4€HÙÙ�CÑ%˜BÐ% "Ñ%Ð%ðØ
�‰�ŒÙ�CÑ%˜BÐ% "Ñ%à
�‰�Õøˆ�‰�Õús   ÁB ÂBc                 óì   — dt        j                  |d¬«      z  }|j                  d¬«      |z
  }|j                  d¬«      |z   }| j	                  |d   |d   «       | j                  |d   |d   «       y )Ngš™™™™™¹?r   ©Úaxisé   )ÚnpÚptpÚminÚmaxÚset_xlimÚset_ylim)r   ÚpointsÚmarginÚxy_minÚxy_maxs        r   Ú_adjust_boundsr*      sm   € Ø”2—6‘6˜& qÔ)Ñ)€FØ�Z‰Z˜QˆZÓ &Ñ(€FØ�Z‰Z˜QˆZÓ &Ñ(€FØ‡K�K��q‘	˜6 !™9Ô%Ø‡K�K��q‘	˜6 !™9Õ%r   c                 óB  — | j                   j                  d   dk7  rt        d«      ‚| j                   j                  \  }}|j	                  ||d«       |j                  ||| j                  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   r   r   $   s~   € ðZ ‡z�z×Ñ˜Ñ˜aÒÜÐ<Ó=Ð=à�:‰:�<‰<�D€A€qØ‡G�GˆAˆq�#ÔØ‡J�Jˆq�!�S—]‘]×'Ñ'Ó)Ô*ä�2�s—z‘zÔ"à�9‰9Ðr   c                 ó”  — ddl m} | j                  j                  d   dk7  rt	        d«      ‚|j                  | j                  dd…df   | j                  dd…df   d«       | j                  D �cg c]  }| j                  |   ‘Œ }}|j                   ||dd	¬
«      «       t        || j                  «       |j                  S c c}w )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   ©ÚLineCollectionr   r,   zConvex hull is not 2-DNr-   ÚkÚsolid)ÚcolorsÚ	linestyle)
Úmatplotlib.collectionsr:   r&   r.   r/   r1   r3   Úadd_collectionr*   r   )Úhullr   r:   ÚsimplexÚline_segmentss        r   r   r   ]   s²   € õZ 6à‡{�{×Ñ˜Ñ˜qÒ ÜÐ1Ó2Ð2à‡G�GˆD�K‰Kš˜1˜Ñ˜tŸ{™{ª1¨a¨4Ñ0°#Ô6Ø9=¿¹ÖH¨g�T—[‘[ Ó)ÐH€MÐHØ×Ñ‘n ]Ø,/Ø/6ô8ô 9ô �2�t—{‘{Ô#à�9‰9Ðùò Is   Á1Cc           	      ó¨  — ddl m} | j                  j                  d   dk7  rt	        d«      ‚|j                  dd«      rI|j                  dd	«      }|j                  | j                  d	d	…df   | j                  d	d	…df   d
|¬«       |j                  dd«      r5|j                  | j                  d	d	…df   | j                  d	d	…df   d«       |j                  dd«      }|j                  dd«      }|j                  dd«      }| j                  j                  d¬«      }t        j                  | j                  d¬«      }	g }
g }t        | j                  | j                  «      D �]�  \  }}t        j                  |«      }t        j                  |dk\  «      r|
j!                  | j                  |   «       ŒS||dk\     d   }| j                  |d      | j                  |d      z
  }|t        j"                  j%                  |«      z  }t        j&                  |d    |d   g«      }| j                  |   j                  d¬«      }t        j(                  t        j*                  ||z
  |«      «      |z  }| j,                  r| }t/        |	j1                  «       |	j3                  «       z  «      }| j                  |   ||	j1                  «       z  |z  z   }|j!                  | j                  |   |g«       �Œ’ |j5                   ||
|||d¬«      «       |j5                   |||||d¬«      «       t7        || j                  «       |j8                  S )ae  
    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. For degenerate input, including collinearity and
    other violations of general position, it may be preferable to
    calculate the Voronoi diagram with Qhull options ``QJ`` for random
    joggling, or ``Qt`` to enforce triangulated output. Otherwise, some
    Voronoi regions may not be visible.

    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()

    r   r9   r   r,   zVoronoi diagram is not 2-DÚshow_pointsTÚ
point_sizeNú.)Ú
markersizeÚshow_verticesr-   Úline_colorsr;   Ú
line_widthg      ð?Ú
line_alphar   r<   )r=   ÚlwÚalphar>   Údashed)r?   r:   r&   r.   r/   Úgetr1   ÚverticesÚmeanr    r!   ÚzipÚridge_pointsÚridge_verticesÚasarrayÚallÚappendÚlinalgÚnormÚarrayÚsignÚdotÚfurthest_siteÚabsr#   r"   r@   r*   r   )Úvorr   r   r:   rF   rJ   rK   rL   ÚcenterÚ	ptp_boundÚfinite_segmentsÚinfinite_segmentsÚpointidxrB   ÚiÚtÚnÚmidpointÚ	directionÚaspect_factorÚ	far_points                        r   r   r   ™   sæ  € õH 6à
‡z�z×Ñ˜Ñ˜aÒÜÐ5Ó6Ð6à	‡v�vˆm˜TÔ"Ø—V‘V˜L¨$Ó/ˆ
Ø
�‰�—
‘
š1˜a˜4Ñ  #§*¡*ªQ°¨TÑ"2°CÀJˆÔOØ	‡v�vˆo˜tÔ$Ø
�‰�—‘šQ ˜TÑ" C§L¡L²°A°Ñ$6¸Ô<à—&‘&˜¨Ó,€KØ—‘˜ cÓ*€JØ—‘˜ cÓ*€Jà�Z‰Z�_‰_ !ˆ_Ó$€FÜ—‘�s—z‘z¨Ô*€Ià€OØÐÜ  ×!1Ñ!1°3×3EÑ3EÓFó CÑˆ�'Ü—*‘*˜WÓ%ˆÜ�6‰6�'˜Q‘,ÔØ×"Ñ" 3§<¡<°Ñ#8Õ9à˜ 1™Ñ% aÑ(ˆAà—
‘
˜8 A™;Ñ'¨#¯*©*°X¸a±[Ñ*AÑAˆAØ”—‘—‘ Ó"Ñ"ˆAÜ—‘˜1˜Q™4˜%  1¡˜Ó'ˆAà—z‘z (Ñ+×0Ñ0°aÐ0Ó8ˆHÜŸ™¤§¡ x°&Ñ'8¸!Ó <Ó=ÀÑAˆIØ×!Ò!Ø&˜J�	Ü 	§¡£°)·-±-³/Ñ AÓBˆMØŸ™ Q™¨)°i·m±m³oÑ*EÈÑ*UÑUˆIà×$Ñ$ c§l¡l°1¡o°yÐ%AÖBð%Cð( ×Ñ‘n _Ø,7Ø(2Ø+5Ø/6ô	8ô 9ð
 ×Ñ‘nÐ%6Ø,7Ø(2Ø+5Ø/7ô	9ô :ô �2�s—z‘zÔ"à�9‰9Ðr   )N)Únumpyr    Úscipy._lib.decoratorr   Ú
_decoratorÚ__all__r   r*   r   r   r   r   r   r   ú<module>rq      si   ðÛ Ý 8â
H€ð òó ðò(&ð ò5ó ð5ðp ò8ó ð8ðv òxó ñxr   