Learn R Programming

rmoo (version 0.1.8)

scatter: Scatter Plot Functions

Description

Allows to make scatter plots in publication quality allowing to represent 2-D, 3-D and M-D

Usage

scatter(object, ...)

Arguments

object

An object of nsga-class, nsga2-class or nsga3-class. See nsga, nsga2 or nsga3 for a description of available slots information.

...

Other arguments passed on to methods. Used to pass the optimal value of the objective function, in case of having it.

Author

Francisco Benitez benitezfj94@gmail.com

Examples

Run this code
#Two Objectives Plotting
zdt1 <- function (x) {
 if (is.null(dim(x))) {
   x <- matrix(x, nrow = 1)
 }
 n <- ncol(x)
 g <- 1 + rowSums(x[, 2:n, drop = FALSE]) * 9/(n - 1)
 return(cbind(x[, 1], g * (1 - sqrt(x[, 1]/g))))
}

#Not run
if (FALSE) {
result <- nsga3(type = "real-valued",
                fitness = zdt1,
                lower = c(0,0),
                upper = c(1,1),
                popSize = 100,
                n_partitions = 100,
                monitor = FALSE,
                maxiter = 500)
}
#Not run
if (FALSE) {
scatter(object = result)
}

Run the code above in your browser using DataLab