R/plot2d.R

Defines functions plot2d

Documented in plot2d

plot2d <- function(x, xlab = "x", ylab = "y", zlab = "PDF"){
  
  estimate = x
  
  if (estimate$variableLength != 2) {
    stop("plot2d can only be used for density data with 2 variables")
  }
  
  
  persp3D(x = estimate$x[, 1], y = estimate$x[, 2], z = estimate$pdf, 
          xlab = xlab, ylab = ylab, zlab = zlab)
  
}

Try the PDFEstimator package in your browser

Any scripts or data that you put into this service are public.

PDFEstimator documentation built on Aug. 24, 2023, 9:07 a.m.