plot3D: Surface plot of two-dimensional test function.

View source: R/plot3D.R

plot3DR Documentation

Surface plot of two-dimensional test function.

Description

Surface plot of two-dimensional test function.

Usage

plot3D(x, length.out = 100L, package = "plot3D", ...)

Arguments

x

[smoof_function]
Two-dimensional snoof function.

length.out

[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.

package

[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.

Examples

library(plot3D)
fn = makeRastriginFunction(dimensions = 2L)
## Not run: 
# 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")

## End(Not run)

smoof documentation built on March 31, 2023, 11:48 p.m.