# Note that you need to install the R package called fMultivar #---------------------------------------------------------- library(fMultivar) x<- (-20:20)/10 X<-grid2d(x) z<-dt2d(X$x, X$y, rho=-0.7, nu=3) Z<- list(x=x, y=x, z=matrix(z, ncol=length(x))) contour(Z, xlab="bi", ylab="bj",xlim=c(-4,4), ylim=c(-4,4)) ph<-5 th<- -45 for(ii in 1:80) { th<- th+(ii-1)*0.04 persp(Z, theta=-th, phi=10, col="grey", xlab="bi",ylab="bj",zlab="p(bi,bj)") } for(ii in 1:100) { ph<- ph+(ii-1)*0.04 persp(Z, theta=-40, phi=ph, col="steelblue", xlab="bi",ylab="bj",zlab="p(bi,bj)") } ph<-5 th<- -45 for(jj in 1:20) { for(ii in 1:20) { ph<- ph+(ii-1)*0.06 th<- th+(ii-1)*0.06 persp(Z, theta=-th, phi=ph, col="pink", xlab="bi",ylab="bj",zlab="p(bi,bj)") } } persp(Z, theta=-45, phi=30, col="lightblue",xlab="bi",ylab="bj",zlab="p(bi,bj)") # USe Irfanview to convert .emf files to .gif or .jpeg