Draws a perspective plot of depth function over x-y plane.

depthPersp(x, plot_method = "lattice", xlim = extendrange(x[, 1], f =
  0.1), ylim = extendrange(x[, 2], f = 0.1), n = 50, xlab = "x",
  ylab = "y", plot_title = NULL, colors = heat_hcl,
  depth_params = list(), graph_params = list())

Arguments

x

bivariate data

plot_method

there are two options "lattice", and "rgl" --- see details

xlim

limits for x-axis

ylim

limits for y-axis

n

number of points that will be used to create plot (\( n ^ 2 \))

xlab

description of x-axis

ylab

description of y-axis

plot_title

plot title (default NULL means paste(depth_params$method, "depth"))

colors

function for colors pallete (e.g. gray.colors).

depth_params

list of parameters for function depth ("method", "threads", "ndir", "la", "lb", "pdim", "mean", "cov", "exact").

graph_params

list of graphical parameters for functions rgl::persp3d and lattice::wireframe.

Details

plot_method --- rgl package is not in depends list beacuse it may cause problems when OpenGL is not supported. To use plot_method = "rgl" you must load this package on your own.

Examples

# EXAMPLE 1 x <- mvrnorm(100, c(0, 0), diag(2)) depthPersp(x, depth_params = list(method = "Euclidean"))
# EXAMPLE 2 data(inf.mort, maesles.imm) data1990 <- na.omit(cbind(inf.mort[, 1], maesles.imm[, 1]))
# NOT RUN { library(rgl) depthPersp(data1990, plot_method = "rgl", depth_params = list(method = "Projection")) # }