Credits Overview Plotting Styles Commands Terminals

convexhull

Convexhull is not a plot style. It can appear either alone as a filter keyword or in combination with smooth path and/or expand <increment>.

     plot FOO using x:y convexhull
     plot FOO using x:y convexhull smooth path
     plot FOO using x:y convexhull expand <increment> {smooth path}

figure_convex_hull

The points in FOO are replaced by a subset of the original points that constitute the unique bounding convex polygon, the convex hull. The vertices of this polygon are output in clockwise order to form a closed curve. The first and last points of the generated curve are equal, making it suitable for plotting with styles lines, polygons, or filledcurves. The convex hull may also be useful as a mask to selectively render the region of an image or a pm3d surface that contains all the original data points. See masking.

If the keyword smooth is present, the vertices are then used as guide points to generate a smooth closed curve (see smooth path). By default this smoothed curve runs through the bounding points.

The optional expand keyword and increment shift the edge segments of the hull away from the interior by an incremental distance. The displaced segments are then connected using miter joins; this means that each vertex of the original hull is replaced by two vertices, since there is now a gap between the to adjoining edges.