plotHull2D: Plot the convex hull of a set of points in 2D. In gMOIP: Tools for 2D and 3D Plots of Single and Multi-Objective Linear/Integer Programming Models

Description

Plot the convex hull of a set of points in 2D.

Usage

 1 2 3 4 5 6 7 8 9 10 11 12 13 14 plotHull2D( pts, drawPoints = FALSE, drawLines = TRUE, drawPolygons = TRUE, addText = FALSE, addRays = FALSE, direction = 1, drawPlot = TRUE, drawBBoxHull = FALSE, m = apply(pts, 2, min) - 5, M = apply(pts, 2, max) + 5, ... )

Arguments

 pts A matrix with a point in each row. drawPoints Draw the points. drawLines Draw lines of the facets. drawPolygons Fill the hull. addText Add text to the points. Currently coord (coordinates), rownames (rownames) and both supported or a vector with text. addRays Add the ray defined by direction. direction Ray direction. If i'th entry is positive, consider the i'th column of pts plus a value greater than on equal zero (minimize objective \$i\$). If negative, consider the i'th column of pts minus a value greater than on equal zero (maximize objective \$i\$). drawPlot Draw the ggplot. Set to FALSE if you want to combine hulls in a single plot. drawBBoxHull If addRays then draw the hull areas hitting the bounding box also. m Minimum values of the bounding box. M Maximum values of the bounding box. ... Further arguments passed on the the ggplot plotting functions. This must be done as lists. Currently the following arguments are supported: argsGeom_point: A list of arguments for ggplot2::geom_point. argsGeom_path: A list of arguments for ggplot2::geom_path. argsGeom_polygon: A list of arguments for ggplot2::geom_polygon. argsGeom_label: A list of arguments for ggplot2::geom_label.

Value

The ggplot object if drawPlot = TRUE; otherwise, a list of ggplot components.