Learn R Programming

PDFEstimator (version 4.5)

plot2d: Plot two-dimensional probability density estimate

Description

The plot method for two-dimensional pdfEstimator objects.

Usage

plot2d(x, xlab = "x", ylab = "y", zlab = "PDF")

Value

No return value, called for side effects

Arguments

x

an "estimatePDFmv" object

xlab

x-axis label for pdf

ylab

y-axis label for pdf

zlab

z-axis label for pdf

Author

Jenny Farmer, Donald Jacobs

References

Farmer, J. and D. Jacobs (2018). "High throughput nonparametric probability density estimation." PLoS One 13(5): e0196937.

Examples

Run this code
library(MultiRNG)
nSamples = 10000
cmat = matrix(c(1.0, 0.0, 0.0, 1.0), nrow = 2, ncol = 2)
meanvec = c(0, 0)
sample = draw.d.variate.normal(no.row = nSamples, d = 2,
                               mean.vec = meanvec, cov.mat = cmat)
mvPDF = estimatePDFmv(sample, resolution = 50)

plot2d(mvPDF)

Run the code above in your browser using DataLab