Learn R Programming

denpro (version 0.9.2)

draw.levset: Plots a level set of a 2D function

Description

Plots a level set of a piecewise constant 2D function.

Usage

draw.levset(pcf, lev=NULL, bary = NULL, propor = 0.1, col=NULL, bound = NULL, dendat = NULL, xaxt = "s", yaxt = "s", cex.axis = 1)

Arguments

pcf
piecewise constant function; output of "pcf.kern" or "pcf.func"
lev
real number; gives the level of the level set
bary
vector of 2 reals; the barycenter; if given will be plotted
propor
0
col
the color of the lines of the plot; for example "red"
bound
vector of 4 real numbers; c(xmin,xmax,ymin,ymax); gives the values for the parameters "xlim" and "ylim" in the "plot" function; if "bound" is not specified, then the support of function "pcf" will be used
dendat
n*2-matrix or real values; when the "pcf" is a density estimate based on data "dendat", then specifying a value for the parameter "dendat", we can plot the data together with the estimate of a level set
xaxt
a character which specifies the x axis type; either "s" or "n"; see "par"
yaxt
a character which specifies the y axis type; either "s" or "n"; see "par"
cex.axis
the magnification to be used for axis annotation

Value

Makes a plot to the graphics window

See Also

pcf.kern, pcf.func

Examples

Run this code
dendat<-sim.data(n=100,type="mulmod")
pcf<-pcf.kern(dendat,h=1,N=c(32,32))

draw.levset(pcf,lev=1.331979e-02)

draw.levset(pcf,propor=0.4)

Run the code above in your browser using DataLab