Skip to contents

Creates a contour plot of function values on a grid.

Usage

function.contours.plot(
  grid,
  f.grid,
  main = "Function Contours",
  nlevels = 20,
  xlab = "",
  ylab = "",
  axes = FALSE,
  add = FALSE,
  ...
)

Arguments

grid

Grid object from create.grid

f.grid

Matrix of function values

main

Plot title

nlevels

Number of contour levels (default 20)

xlab

X-axis label

ylab

Y-axis label

axes

Logical, whether to show axes

add

Logical, whether to add to existing plot

...

Additional arguments passed to contour

Value

Invisible NULL

Examples

if (FALSE) { # \dontrun{
grid <- create.grid(50)
f <- function(x, y) sin(3*x) * cos(3*y)
f.grid <- evaluate.function.on.grid(f, grid)
function.contours.plot(grid, f.grid)
} # }