Function Reference
— Function File: voronoi (x, y)
— Function File: voronoi (x, y, "plotstyle")
— Function File: voronoi (x, y, "plotstyle", options)
— Function File: [vx, vy] = voronoi (...)

plots voronoi diagram of points (x, y). The voronoi facets with points at infinity are not drawn. [vx, vy] = voronoi(...) returns the vertices instead plotting the diagram. plot (vx, vy) shows the voronoi diagram.

A fourth optional argument, which must be a string, contains extra options passed to the underlying qhull command. See the documentation for the Qhull library for details.

            x = rand (10, 1);
            y = rand (size (x));
            h = convhull (x, y);
            [vx, vy] = voronoi (x, y);
            plot (vx, vy, "-b", x, y, "o", x(h), y(h), "-g")
            legend ("", "points", "hull");