Plots a level set of a 2D function

Description

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

Usage

1
2
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<propor<1; the level set whose level is "propor" times the maximum value of the function will be drawn

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

Author(s)

Jussi Klemela

See Also

pcf.kern, pcf.func

Examples

1
2
3
4
5
6
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)

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