Surface plot of two-dimensional test function.
plot3D(x, length.out = 100L, package = "plot3D", ...)
[smoof_function
]
Two-dimensional snoof function.
[integer(1)
]
Determines the “smoothness” of the grid. The higher the value, the
smoother the function landscape looks like. However, you should avoid setting
this parameter to high, since with the contour
option set to TRUE
the drawing can take quite a lot of time. Default is 100
.
[character(1)
]
String describing the package to use for 3D visualization.
At the moment “plot3D” (package plot3D) and
“plotly” (package plotly) are supported.
The latter opens a highly interactive plot in a web brower
and is thus suited well to explore a function by hand.
Default is “plot3D”.
[any]
Furhter parameters passed to method used for visualization
(which is determined by the package
argument.
library(plot3D)
fn = makeRastriginFunction(dimensions = 2L)
if (FALSE) {
# use the plot3D::persp3D method (default behaviour)
plot3D(fn)
plot3D(fn, contour = TRUE)
plot3D(fn, image = TRUE, phi = 30)
# use plotly::plot_ly for interactive plot
plot3D(fn, package = "plotly")
}