The function generates a 2D plot of the vertexes in a simplex optimization when simplex dimensionality is at least 2. When dimensionality is higher than 2, the plot produced is a projection of the selected variables.
# S3 method for smplx
plot(x, sel.dim = NULL, all.ver = TRUE, all.lin = TRUE,
expand = TRUE, exp.fac = 1.5, ...)
object of class smplx
.
numeric
or char
vector for variables to be
considered when simplex dimensionality is higher than 2.
By default, the first two are chosen. If the vector is
numeric
, it must contain the ordinal numbers
corresponding to the desired variables. If the vector is of
class char
, it must contain the names of such
dimensions.
logical default to TRUE
. Should all vertexes be
plotted? If FALSE
, the function draws only the
vertexes of the current simplex.
logical default to TRUE
. Should all lines be drawn?
If FALSE
, the function draws only the lines of the
last simplex.
logical default to TRUE
. Should the plot scales be
expanded?
expansion factor used when expand = TRUE
.
other graphical parameters used in
plot
2D plot of the simplex coordinates.
For 3D representations of simplexes with dimensionality higher than 2 you
can use plotSimplex3D
.
# NOT RUN {
plot(x = labsimplex(n = 2, centroid = c(7, 340), stepsize = c(1.2, 15)))
## Several options are posible when visualizing higher order simplexes
plot(x = labsimplex(n = 3))
plot(x = labsimplex(n = 3), sel.dim = c(2, 3))
## Simplex movements can be visualized after some experiments has been
## performed
simplex <- exampleOptimization(surface = exampleSurfaceR2,
centroid = c(7, 340),
stepsize = c(1.2, 15), experiments = 16)
plot(x = simplex)
# }
Run the code above in your browser using DataLab