Re: [R] Plot bivariate density with densities margins

2011-02-22 Thread Eduardo García Portugués
I found an easy way to do it using trans3d() and the transformation matrix. Maybe in the future somebody would ask about it: # For plotting the bivariate gaussian density library(mvtnorm) x<-seq(-5,5,by=0.1) y<-seq(-3,7,by=0.1) # Joint density f<-function(x,y) dmvnorm(cbind(x,y),mean=c(0,2),sigm

[R] Plot bivariate density with densities margins

2011-02-09 Thread Eduardo García Portugués
Dear R users, I would like to plot the bivariate density surface with its marginal densities on the sides of the 3D box, just like in the picture I attach. I tried to found information about how to do it but did not find anything. Does anyone know how to do it? Thanks in advance, Eduardo. _