Learn R Programming

soobench (version 1.9.18)

plot3d: Plot a test function in 3D.

Description

Plot a test function in 3D.

Usage

plot3d(
  x,
  lower = lower_bounds(x),
  upper = upper_bounds(x),
  n = 10000L,
  main = function_name(x),
  xlab = expression(x[1]),
  ylab = expression(x[2]),
  log = FALSE,
  rank = FALSE,
  ...
)

Arguments

x

Object of type soo_function to plot.

lower

Lower bounds of x1 and x2.

upper

Upper bounds of x1 and x2.

n

Number of locations at which to sample the function.

main

Main title of plot.

xlab

Label of x (x1) axes.

ylab

Label of y (x2) axes.

log

If TRUE, the z axes is plotted on log scale.

rank

If TRUE, instead of the y values, their ranks are drawn.

...

Passed to persp3d.default.

par(mfrow=c(1, 3)) fn <- generate_sphere_function(2) plot3d(fn) plot3d(fn, log=TRUE) plot3d(fn, rank=TRUE)