Skip to contents

Plots local maxima and minima from grid-based critical point detection.

Usage

grid.critical.points.plot(
  grid,
  critical.points,
  max.color = "red",
  min.color = "blue",
  max.pch = 4,
  min.pch = 20,
  main = "Critical Points",
  point.size = 2,
  xlab = "",
  ylab = "",
  axes = FALSE,
  add = FALSE,
  ...
)

Arguments

grid

Grid object from create.grid

critical.points

List with 'maxima' and 'minima' matrices

max.color

Color for maxima (default "red")

min.color

Color for minima (default "blue")

max.pch

Symbol for maxima (default 4, cross)

min.pch

Symbol for minima (default 20, filled circle)

main

Plot title

point.size

Point size multiplier (default 2)

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 plot

Value

Invisible list with color information

Examples

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