Learn R Programming

rmoo (version 0.1.6)

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.

Examples

Run this code
# NOT RUN {
#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
# }
# NOT RUN {
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 {
#Not run
# }
# NOT RUN {
scatter(object = result)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab