
    _Mh                         d dl Z d dlZd dlmZmZmZ 	 d dlZdej        d<   d dl	m
Z dZn# e$ r dZY nw xY wd dlmZmZmZmZmZmZ e j                            e d	           G d
 d                      ZdS )    N)assert_assert_array_equalassert_allcloseAggbackendTF)delaunay_plot_2dvoronoi_plot_2dconvex_hull_plot_2dDelaunayVoronoi
ConvexHullzMatplotlib not available)reasonc                   4    e Zd Zg dZd Zd Zd Zd Zd ZdS )TestPlotting))r   r   )r      )r   r   )r   r   c                 ^   t          j                    }t          | j                  }|j                                        }t          ||                                          }t          |j        |           t          ||u            t          ||                                           d S Nax)
pltfigurer   points	simplicescopyr   gcar   r   )selffigobjs_beforers        c/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/scipy/spatial/tests/test__plotutils.pytest_delaunayzTestPlotting.test_delaunay   s    jllt{##=%%''SSWWYY///3=(333S++++++    c                     t          j                    }t          | j                  }t	          ||                                          }t          ||u            t	          |           t	          |d           d S )Nr   F)show_vertices)r   r   r   r   r	   r   r   )r   r   r   r    s       r!   test_voronoizTestPlotting.test_voronoi    so    jlldk""CCGGII...S5111111r#   c                     t          j                    }t          | j                  }t	          ||                                          }t          ||u            t	          |           d S r   )r   r   r   r   r
   r   r   )r   r   trir    s       r!   test_convex_hullzTestPlotting.test_convex_hull)   s\    jll%%		222SC     r#   c                 n   t          j        ddgddgddgddgd	d
gg          }t          |          }t          |          }|                                }|j        d                                         }t          j        ddgddggddgddggddgddggddgddggg          }t          ||           d S )Ngnin@br(%@gft@>,%@g$$Im@ӝ7*@gBz!vp@`MNe)@g1f'qk@ 5*@r   g*g\q@g*ogV謫q@gf3gwh\q@ggaogϘ^z@giZ@gl@g9nJf4gkZ~egxðgr@gtg@g}t@g6-p@nparrayr   r	   r   collectionsget_segmentsr   r   r   vorr   r   infinite_segmentsexpected_segmentss          r!   test_gh_19653zTestPlotting.test_gh_196531   s    ,.@A.0BC.0BC.0AB.0BC	E F F
 fooc""WWYYN1-::<<H	:'>(2L'A'C(4m'D(4m'D'F(4|'D(5~'F'H(4m'D(4m'D'F&G H H 	)+<=====r#   c                 n   t          j        ddgddgddgddgd	d
gg          }t          |          }t          |          }|                                }|j        d                                         }t          j        ddgddggddgddggddgddggddgddggg          }t          ||           d S )NgnN[8@r+   g4>@@r,   gI'L7@r-   g 0b:@r.   g6;5@r/   r   g7eF<@gҍ @g.+=E<@gVLEg eF<@gۮ @g6E@gmBR9L@gFv6@go'@g]tq/(g\rV8g>=@gwS@gώLn@@g8`@r0   r5   s          r!   test_gh_19653_smaller_aspectz)TestPlotting.test_gh_19653_smaller_aspectG   s    O-?@-/AB-/AB-/@A-/AB	D E E
 fooc""WWYYN1-::<<H	8'<(1<'@'B(3Z'@(3['A'C(3Z'@(4l'C'E(3['A(3\'B'D&E F F 	)+<=====r#   N)	__name__
__module____qualname__r   r"   r&   r)   r9   r;    r#   r!   r   r      sj        )))F, , ,2 2 2! ! !> > >,> > > > >r#   r   )pytestnumpyr1   numpy.testingr   r   r   
matplotlibrcParamsmatplotlib.pyplotpyplotr   has_matplotlib	Exceptionscipy.spatialr   r	   r
   r   r   r   markskipifr   r?   r#   r!   <module>rL      sF        F F F F F F F F F F%*J	"######NN   NNN# # # # # # # # # # # # # # # #
 &/IJJH> H> H> H> H> H> H> KJH> H> H>s   + 55