plot_2d_soo_function: Plot a test function in 2D.

Description Usage Arguments Author(s) Examples

View source: R/plot_soo_function.R

Description

Plot a test function in 2D.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
plot_2d_soo_function(
  fn,
  lower = lower_bounds(fn),
  upper = upper_bounds(fn),
  n = 10000L,
  main = function_name(fn),
  xlab = expression(x[1]),
  ylab = expression(x[2]),
  log = FALSE,
  rank = FALSE,
  asp = 1,
  show = c("image", "contour"),
  image_args = list(useRaster = TRUE),
  contour_args = list(),
  ...
)

Arguments

fn

[soo_function] Function to plot.

lower

[numeric] Lower bounds of x1 and x2.

upper

[numeric] Upper bounds of x1 and x2.

n

[integer(1)] Number of locations at which to sample the function.

main

[character(1)] Main title of plot.

xlab

[character(1)] Label of x (x1) axes.

ylab

[character(1)] Label of y (x2) axes.

log

[boolean(1)] If TRUE, the z axes is plotted on log scale.

rank

[boolean(1)] If TRUE, instead of the y values, their ranks are drawn.

asp

[numeric(1)] Aspect ratio of plot. Defaults to 1.

show

[character] A vector of parts to plot. Defaults to c("image", "contour") and can be any subset.

image_args

[list] List of further arguments passed to image().

contour_args

[list] List of further arguments passed to contour().

...

Ignored.

Author(s)

Olaf Mersmann olafm@p-value.net

Examples

1
2
3
4
5
6
par(mfrow=c(2, 2))
fn <- generate_sphere_function(2)
plot(fn)
plot(fn, show="contour")
plot(fn, rank=TRUE)
plot(fn, log=TRUE)

soobench documentation built on Feb. 9, 2020, 5:08 p.m.