+
    ,i                     x    ^ RI t^ RIHt . ROt]R	R l4       tR t]R	R l4       t]R	R l4       t	]R	R l4       t
R# )
    N)	decoratorc                 @   ^ RI Hp Vf,   VP                  4       pVP                  4       pV ! V3RV/VB # \	        VRR 4      ! 4       pV'       d   V ! V3RV/VB #  VP                  R4       V ! V3RV/VB VP                  V4       #   TP                  T4       i ; i)r   Naxisholdc                      R # )T r       :/usr/lib/python3/dist-packages/scipy/spatial/_plotutils.py<lambda>_held_figure.<locals>.<lambda>   s    Tr	   T)matplotlib.pyplotpyplotfiguregcagetattrhold)funcobjr   kwpltfigwas_helds   &&&,   r
   _held_figurer      s    #	zjjlWWYC%B%"%% r8\24HC%B%"%%
C%B%"%
s   B
 
Bc                 (   R \         P                  ! V^ R7      ,          pVP                  ^ R7      V,
          pVP                  ^ R7      V,           pV P	                  V^ ,          V^ ,          4       V P                  V^,          V^,          4       R# )g?axisN)npptpminmaxset_xlimset_ylim)r   pointsmarginxy_minxy_maxs   &&   r
   _adjust_boundsr'      sm    266&q))FZZQZ&(FZZQZ&(FKKq	6!9%KKq	6!9%r	   c                F   V P                   P                  ^,          ^8w  d   \        R4      hV P                   P                  w  r#VP	                  W#R4       VP                  W#V P                  P                  4       4       \        WP                   4       VP                  # )a  
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()

z!Delaunay triangulation is not 2-Do)
r#   shape
ValueErrorTplottriplot	simplicescopyr'   r   )trir   xys   &&  r
   delaunay_plot_2dr4   $   sv    Z zza<==::<<DAGGA#JJqS]]'')*2zz"99r	   c                   ^ RI Hp V P                  P                  ^,          ^8w  d   \	        R4      hVP                  V P                  R,          V P                  R,          R4       V P                   Uu. uF  q0P                  V,          NK  	  ppVP                  V! VRRR7      4       \        WP                  4       VP                  # u upi )	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()

LineCollectionzConvex hull is not 2-Dr)   ksolid)colors	linestyleNNNr   r=      )
matplotlib.collectionsr7   r#   r*   r+   r-   r/   add_collectionr'   r   )hullr   r7   simplexline_segmentss   &&   r
   convex_hull_plot_2drE   ]   s    Z 6{{q 122GGDKKt{{40#69=Hg[[))MHn],//68 9 2{{#99 Is   7Cc           
        ^ RI Hp V P                  P                  ^,          ^8w  d   \	        R4      hVP                  RR4      '       dJ   VP                  RR4      pVP                  V P                  R,          V P                  R,          RVR7       VP                  R	R4      '       d6   VP                  V P                  R,          V P                  R,          R
4       VP                  RR4      pVP                  RR4      pVP                  RR4      pV P                  P                  ^ R7      p\        P                  ! V P                  ^ R7      p	. p
. p\        V P                  V P                  4       EF  w  r\        P                  ! V4      p\        P                  ! V^ 8  4      '       d%   V
P!                  V P                  V,          4       K_  W^ 8  ,          ^ ,          pV P                  V^,          ,          V P                  V^ ,          ,          ,
          pV\        P"                  P%                  V4      ,          p\        P&                  ! V^,          ) V^ ,          .4      pV P                  V,          P                  ^ R7      p\        P(                  ! \        P*                  ! VV,
          V4      4      V,          pV P,                  '       d   V) p\/        V	P1                  4       V	P3                  4       ,          4      pV P                  V,          VV	P1                  4       ,          V,          ,           pVP!                  V P                  V,          V.4       EK  	  VP5                  V! V
VVVRR7      4       VP5                  V! VVVVRR7      4       \7        WP                  4       VP8                  # )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. 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()

r6   zVoronoi diagram is not 2-Dshow_pointsT
point_sizeN.)
markersizeshow_verticesr)   line_colorsr8   
line_widthg      ?
line_alphar   r9   )r:   lwalphar;   dashedr<   r>   )r@   r7   r#   r*   r+   getr-   verticesmeanr   r   zipridge_pointsridge_verticesasarrayallappendlinalgnormarraysigndotfurthest_siteabsr    r   rA   r'   r   )vorr   r   r7   rH   rL   rM   rN   center	ptp_boundfinite_segmentsinfinite_segmentspointidxrC   itnmidpoint	directionaspect_factor	far_points   &&,                  r
   voronoi_plot_2dro      s   H 6
zza566	vvmT""VVL$/



4 #**T"2CJO	vvot$$
T"CLL$6<&&,Kc*Jc*JZZ__!_$Fszz*IO !1!133E3EF**W%66'Q,""3<<#891%a(A

8A;'#**Xa[*AAA""A1Q4%1'Azz(+00a08Hx&'8! <=AI!!!&J		)--/ ABMQ)immo*E*UUI$$cll1oy%AB% G( n_,7(2+5/6	8 9
 n%6,7(2+5/7	9 : 2zz"99r	   )r4   rE   ro   )N)numpyr   scipy._lib.decoratorr   
_decorator__all__r   r'   r4   rE   ro   r   r	   r
   <module>rt      si     8
H  (& 5 5p 8 8v x xr	   