Learn R Programming

gMOIP (version 1.5.3)

plotNDSet2D: Create a plot of a discrete non-dominated set.

Description

Create a plot of a discrete non-dominated set.

Usage

plotNDSet2D(
  points,
  crit,
  addTriangles = FALSE,
  addHull = TRUE,
  latex = FALSE,
  labels = NULL
)

Value

The ggplot object.

Arguments

points

Data frame with non-dominated points.

crit

Either max or min (only used if add the iso-profit line). A vector is currently not supported.

addTriangles

Add search triangles defined by the non-dominated extreme points.

addHull

Add the convex hull and the rays.

latex

If true make latex math labels for TikZ.

labels

If NULL don't add any labels. If 'n' no labels but show the points. If equal coord add coordinates to the points. Otherwise number all points from one.

Author

Lars Relund lars@relund.dk

Examples

Run this code
dat <- data.frame(z1=c(12,14,16,18,18,18,14,15,15), z2=c(18,16,12,4,2,6,14,14,16))
points <- addNDSet(dat, crit = "min", keepDom = TRUE)
plotNDSet2D(points, crit = "min", addTriangles = TRUE)
plotNDSet2D(points, crit = "min", addTriangles = FALSE)
plotNDSet2D(points, crit = "min", addTriangles = TRUE, addHull = FALSE)
points <- addNDSet(dat, crit = "max", keepDom = TRUE)
plotNDSet2D(points, crit = "max", addTriangles = TRUE)
plotNDSet2D(points, crit = "max", addHull = FALSE)

Run the code above in your browser using DataLab