Last data update: 2014.03.03

R: Bivariate Density Plot
BiDensPlotR Documentation

Bivariate Density Plot

Description

Generates eiether a perspective or a contour plot of a bivariate density.

Usage

BiDensPlot(func, xpts = c(-2, 2), ypts = c(-2, 2), npts = 50,
           type = c("persp", "contour"), ...)

Arguments

func

function, the name of a bivariate density function.

xpts

vector, interval of x.

ypts

vector, interval of y.

npts

integer, number of subdivision points between x and y over the specified range xpts to ypts.

type

character, the plot type, either a perspective or a contour plot.

...

ellipsis, arguments are passed to the call of func.

Value

Returns invisibly a list of (x, y, z) triplet.

Examples

BiDensPlot(func = dmnorm, mu = c(0, 0), Sigma = equicorr(2, -0.7)) 

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(QRM)
Loading required package: gsl
Loading required package: Matrix
Loading required package: mvtnorm
Loading required package: numDeriv
Loading required package: timeSeries
Loading required package: timeDate

Attaching package: 'QRM'

The following object is masked from 'package:base':

    lbeta

> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/QRM/Bidensplot.Rd_%03d_medium.png", width=480, height=480)
> ### Name: BiDensPlot
> ### Title: Bivariate Density Plot
> ### Aliases: BiDensPlot
> ### Keywords: hplot
> 
> ### ** Examples
> 
> BiDensPlot(func = dmnorm, mu = c(0, 0), Sigma = equicorr(2, -0.7)) 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>