hatvis.plotting.convex_hull#
- hatvis.plotting.convex_hull(points)[source]#
Convex hull vertices in counter-clockwise order (Andrew’s monotone chain).
Collinear and duplicate points are removed. Returns an
(h, 2)array (hmay be 1 or 2 for degenerate input).>>> convex_hull([[0, 0], [1, 0], [1, 1], [0, 1], [0.5, 0.5]]).tolist() [[0.0, 0.0], [1.0, 0.0], [1.0, 1.0], [0.0, 1.0]]