title: 2D Normal PDF with ggplot and R
body: <p>I'm trying to make a contour/image plot using ggplot but with no success til now.</p>
  
  <p>Consider the following piece of code in R that creates a matrix <code>z</code> with the PDF of a bivariate normal:</p>
  
  <pre><code>require(mvtnorm)
  x1 = seq(-3, 3, length.out=200)
  x2 = seq(-3, 3, length.out=200)
  z = matrix(0, length(x1), length(x2))
  for (i in 1:length(x1)) {
      a = x1
      b = x2[i]
      z[,i] = dmvnorm(cbind(a,b))
  }
  image(x1,x2,z)
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/twlYj.png" alt="2D normal pdf image plot"></p>
  
  <p>Is it possible to plot the matrix <code>z</code> using ggplot?</p>
  
  <p>Thanks!</p>