mrfDepth (version 1.0.12)

plotContours: Draws depth contours of bivariate data

Description

Draws the depth contours of bivariate data computed with depthContour.

Usage

plotContours(x, depthContour, data = TRUE)

Arguments

x

An \(n\) by 2 data matrix.

depthContour

The result of a call to depthContour.

data

Logical value indicating whether the data x should be plotted.

Details

The plot is made using ggplot2. The plot itself is returned by the function and is fully customisable using standard ggplot2 commands.

References

Ruts I., Rousseeuw P.J. (1996). Computing depth contours of bivariate point clouds. Computational Statistics & Data Analysis, 23, 153-168.

See Also

depthContour

Examples

Run this code
# NOT RUN {
data(cardata90)
Result <- depthContour(x=cardata90, alpha=c(0.02,0.125,0.3) , type="hdepth")
plotContours(x = cardata90, depthContour = Result)
Result <- depthContour(x=cardata90, alpha=c(0.1, 0.2, 0.3, 0.4) , type="projdepth")
plotContours(x = cardata90, depthContour = Result)
Result <- depthContour(x=cardata90, alpha=c(0.1, 0.2, 0.3, 0.4) , type="sprojdepth")
plotContours(x = cardata90, depthContour = Result)

# }

Run the code above in your browser using DataLab