Learn R Programming

Emcdf (version 0.1.2)

plotcdf: Plots multivariate empirical joint distribution of bivariate data

Description

This function plots empirical joint distribution (joint CDF) with levelplot, and 3D wireframes.

Usage

plotcdf(data, type = "levelplot", angle = 60,
  main = paste("Bivariate CDF of", deparse(substitute(data))))

Arguments

data

a numeric matrix / data frame of two variables.

type

a character spicifies plot types. Must be one of "levelplot", "wireframe", or "multiple_wireframe".

angle

a numeric scalar for z axis rotation. With default = 60 degrees.

main

a character of plot title.

Details

When type = "multiple_wireframe", this function plots 8 wireframes of directions 0 to what parameter angle is. This process takes longer. When type = "levelplot", parameter angle has no effect.

Examples

Run this code
# NOT RUN {
n = 10
set.seed(123)
x = rnorm(n)
y = x^2 + 0.1*rnorm(n)
data = cbind(x, y)
plotcdf(data, type = "multiple_wireframe")

# }

Run the code above in your browser using DataLab