depth.contours: Depth Contours

Description Usage Arguments See Also Examples

View source: R/depth.contours.r

Description

Builds the data depth contours for 2-dimensional data.

Usage

1
2
3
4
5
depth.contours(data, depth, 
              main = "", xlab="", ylab = "", 
              drawplot = T, frequency=100, levels = 10,
              col = "red",
              ...)

Arguments

data

2-dimensional numeric data frame or matrix

depth

the name of the depth function. The list of the supported depths and described in the topic depth..

main

an overall title for the plot: see title

xlab, ylab

labels of the axes

drawplot

if set to false, the contours are built on the existing plot.

frequency

number of points on each direction, x and y. Impacts the smoothness of the contours.

levels

numeric vector of levels at which to draw contour lines. If the vector contains only ONE element, the levels are generated automatically as seq(0, max(depth), length.out = levels).

col

color, used to draw points and contours

...

additional parameters passed to the depth functions and to plot

See Also

depth., depth.contours.ddalpha, depth.graph.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 

par(mfrow = c(2,2))
data(hemophilia)

depth.contours(hemophilia[,1:2], depth = "none", main = "data")

for (depth in c("zonoid", "Mahalanobis", "projection", "spatial")){
  depth.contours(hemophilia[,1:2], depth = depth, main = depth)
}

for (depth in c("halfspace", "simplicial", "simplicialVolume")){
  depth.contours(hemophilia[,1:2], depth = depth, main = depth, exact = T)
}



## End(Not run)

ddalpha documentation built on Jan. 9, 2020, 5:09 p.m.