Learn R Programming

DepthProc (version 1.0.3)

depthPersp: Perspective plot for depth functions

Description

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

Usage

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, ...)

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(method, "depth"))
colors
function for colors pallete (e.g. gray.colors).
...
arguments passed to depth function

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

Run this code
x = mvrnorm(100,c(0,0),diag(2))
 depthPersp(x, method = "Euclidean")

# EXAMPLE 2
data(inf.mort,maesles.imm)
data1990=na.omit(cbind(inf.mort[,1],maesles.imm[,1]))

require(rgl)
depthPersp(data1990, method = "Projection",plot_method= "rgl")

Run the code above in your browser using DataLab