
    tKg                         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d dlmZmZmZmZmZmZ e j*                  j-                  e d	       G d
 d             Zy# e$ r dZY Ew xY w)    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                   2    e Zd Zg dZd Zd Zd Zd Zd Zy)TestPlotting))r   r   )r      )r   r   )r   r   c                 <   t        j                         }t        | j                        }|j                  j                         }t        ||j                               }t        |j                  |       t        ||u        t        ||j                                y Nax)
pltfigurer   points	simplicescopyr   gcar   r   )selffigobjs_beforers        g/home/alanp/www/video.onchill/myenv/lib/python3.12/site-packages/scipy/spatial/tests/test__plotutils.pytest_delaunayzTestPlotting.test_delaunay   si    jjlt{{#==%%'SSWWY/3==(3S+    c                     t        j                         }t        | j                        }t	        ||j                               }t        ||u        t	        |       t	        |d       y )Nr   F)show_vertices)r   r   r   r   r	   r   r   )r   r   r   r    s       r!   test_voronoizTestPlotting.test_voronoi    sK    jjldkk"CCGGI.S51r#   c                     t        j                         }t        | j                        }t	        ||j                               }t        ||u        t	        |       y r   )r   r   r   r   r
   r   r   )r   r   trir    s       r!   test_convex_hullzTestPlotting.test_convex_hull)   sA    jjl%	2SC r#   c                 L   t        j                  ddgddgddgddgd	d
gg      }t        |      }t        |      }|j	                         }|j
                  d   j                         }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        ||       y )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
 foc"WWYNN1-::<HH	:'>(2L'A'C(4m'D(4m'D'F(4|'D(5~'F'H(4m'D(4m'D'F&G H 	)+<=r#   c                 L   t        j                  ddgddgddgddgd	d
gg      }t        |      }t        |      }|j	                         }|j
                  d   j                         }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        ||       y )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
 foc"WWYNN1-::<HH	8'<(1<'@'B(3Z'@(3['A'C(3Z'@(4l'C'E(3['A(3\'B'D&E F 	)+<=r#   N)	__name__
__module____qualname__r   r"   r&   r)   r9   r;    r#   r!   r   r      s     )F,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      s      F F%*J	"#N# #
 &/IJH> H> KH>  Ns   A+ +A54A5