Credits Overview Plotting Styles Commands Terminals

concavehull

EXPERIMENTAL (implementation details may change in a future release). Present only if your copy of gnuplot was configured --enable-chi-shapes.

Concavehull is not a plot style. It is a filter that finds a bounding polygon, a "hull", of the input data points and replaces the original points with an ordered subset of points that lie along the perimeter of this polygon. Unlike the convex hull, which is uniquely defined for any set of points, more than one concave hull is possible. Various schemes for selecting a concave hull exist; gnuplot generates hulls that are χ-shapes as defined by Duckham et al. (2008) Patttern Recognition 41:3224-3236.

figure_concave_hull_1

For a given set of points, a χ-shape is generated by iterative removal of triangles from the Delaunay triangulation. Each iteration removes a single triangle subject to the criteria: (1) A triangle is only eligible for removal if this would not reduce the connectivity of the bounded shape to contact at a single point; (2) one edge of the triangle is the longest segment of the current perimeter; (3) this edge is longer than a pre-selected characteristic length parameter that fully determines the χ-shape. In gnuplot this characteristic length parameter is taken from user variable chi_length. Iteration stops when there are no remaining eligible triangles. If chi_length is large, no triangles are removed and the χ-shape is the original perimeter, i.e. the convex hull. As chi_length is reduced, more and more triangles are removed and the resulting shape becomes increasingly less convex. Too-small values of chi_length are undesirable.

figure_concave_hull_2

Appropriate choice of chi_length depends strongly on the density and distribution of the input data points. If no value for chi_length has been set by the user, gnuplot will choose one automatically but there is no guarantee that this value is suitable for your data. For the data used in the figures shown here gnuplot would choose chi_length=22.6 by default, which is 0.6 of the length of the longest edge in the convex hull. You can change the fraction of the longest edge used as a default with the command set chi_shape fraction <value>

The value of chi_length used in the current plot, whether provided by the user or chosen by the program, is saved to variable GPVAL_CHI_LENGTH.

The optional expand keyword and increment shift each edge segment of the hull away from the interior by a fixed distance. This creates a new set of points describing a closed curve that lies outside all of the original points. It can be combined with smooth path.