#'Function of 'Plot Three Dimensional Graph'
#'
#'@param x,y Numeric vectors
#'@param f A function
#'
#'@return a three dimensional graph
#'
#'@examples
#'x <- seq(-10, 10, length = 30)
#'y <- x
#'f <- function(x, y){r <- sqrt(x ^ 2 + y ^ 2);10 * sin(r) / r}
#'plot3D(x, y, f)
#'
#'@export
plot3D <- function(x, y, f){
z <- outer(x, y, f)
z[is.na(z)] <- 1
op <- par(bg = 'white')
persp(x, y, z, theta = 30, phi = 30, expand = 0.5, col = 'light blue')
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.