HMPlot

Hull

The convex hull around points, one per group, as triangles for Polygon.

Polygons. x from 0.9 to 4.1, y from 0.9 to 3.1. 2 rows.

Static preview; loading the interactive plot

import hmplot as hm

data = {"x": [1, 3, 2, 4, 2.5, 3], "y": [1, 1, 3, 3, 2, 2.5]}
with hm.Plot(data=data, height=300, axes2d=True) as plot:
    with hm.Hull(x="x", y="y"):
        hm.Polygon()
plot

Options

Keywords are snake_case.

namestring
Names the transform, so a Facet's getTransform(name) reaches its copy in every cell.
xcolumn
The points' x column.
ycolumn
The points' y column.
bycolumn | column[]
Groups, a hull each, carrying the group's first row (one hull around every point without it).

Usage

Hull makes the convex hull of each group of by as triangles for Polygon, carrying the group’s first row: fill="species" colors each hull by its group.

Related examples

Voronoi cells, hulls and a Delaunay triangulation