Plot Polygonal Domain on Image of Bivariate Function
Description
Produces a combined plot of a polygonal domain and an image of a bivariate
function, using either lattice::levelplot
or image
.
Usage
1 2 3 
Arguments
polyregion 
a polygonal domain.
The following classes are supported: 
f 
a twodimensional real function. As its first argument it must take a coordinate matrix, i.e., a numeric matrix with two columns, and it must return a numeric vector of length the number of coordinates. 
... 
further arguments for 
npixel 
numeric vector of length 1 or 2 setting the number of pixels in each dimension. 
cuts 
number of cut points in the z dimension.
The range of function values will be divided into 
col 
colour vector used for the function levels. 
lwd 
line width of the polygon edges. 
xlim,ylim 
numeric vectors of length 2 setting the axis limits.

use.lattice 
logical indicating if lattice graphics
( 
print.args 
a list of arguments passed to 
Author(s)
Sebastian Meyer
Examples
1 2 3 4 5 6 7 8 9 10 11  ### a polygonal domain
data("letterR", package="spatstat")
### f: isotropic exponential decay
fr < function(r, rate=1) dexp(r, rate=rate)
fcenter < c(2,3)
f < function (s, rate=1) fr(sqrt(rowSums(t(t(s)fcenter)^2)), rate=rate)
### plot
plotpolyf(letterR, f, use.lattice=FALSE)
plotpolyf(letterR, f, use.lattice=TRUE)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker. Vote for new features on Trello.