| plotSurface2D | R Documentation | 
Convenient wrapper for plotting a contour plot of a real function of two variables.
plotSurface2D(x = seq_len(nrow(z)), y = seq_len(ncol(z)), f, z = NULL,
  nLev = 20, levels = NULL, fVect = FALSE, ...)
| x, y | numerical grids fore each dimension. They must be in ascending order. | 
| f | function to be plot. Must take a single argument (see examples). | 
| z | a vector of length  | 
| nLev | the number of levels the range of  | 
| levels | vector of contour levels. If not provided, it is set to
 | 
| fVect | flag to indicate whether  | 
| ... | further arguments passed to  | 
The matrix z, invisible.
grid <- seq(-pi, pi, l = 100)
plotSurface2D(grid, grid, f = function(x) sin(x[1]) * cos(x[2]), nLev = 20)
plotSurface2D(grid, grid, f = function(x) sin(x[, 1]) * cos(x[, 2]),
              levels = seq(-1, 1, l = 10), fVect = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.