Learn R Programming

QRM (version 0.4-7)

BiDensPlot: Bivariate Density Plot

Description

Generates eiether a perspective or a contour plot of a bivariate density.

Usage

BiDensPlot(func, xpts = c(-2, 2), ypts = c(-2, 2), npts = 50,
           type = c("persp", "contour"), ...)

Arguments

func
function, the name of a bivariate density function.
xpts
vector, interval of x.
ypts
vector, interval of y.
npts
integer, number of subdivision points between x and y over the specified range xpts to ypts.
type
character, the plot type, either a perspective or a contour plot.
...
ellipsis, arguments are passed to the call of func.

Value

  • Returns invisibly a list of (x, y, z) triplet.

Examples

Run this code
BiDensPlot(func = dmnorm, mu = c(0, 0), Sigma = equicorr(2, -0.7))

Run the code above in your browser using DataLab