## Bivariate Normal Density:
x = (-40:40)/10
X = grid2d(x)
z = dnorm2d(X$x, X$y, rho = 0.5)
Z = list(x = x, y = x, z = matrix(z, ncol = length(x)))
persp(Z, theta = -40, phi = 30, col = "steelblue")
Run the code above in your browser using DataLab