title: A true heat map in R
body: <p>I'd like to make a true heat map in R, much like a weather map, except my data is much more simple.</p>
  
  <p>Consider this 3d data:</p>
  
  <pre><code>x &lt;- c(1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,4,4,4,4,4)
  y &lt;- c(1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5)
  z &lt;- rnorm(20)
  </code></pre>
  
  <p>The z would be color.</p>
  
  <p>Here is what a discrete looking heatmap would like for this data:
  <img src="https://i.stack.imgur.com/Vm9dW.png" alt="enter image description here"></p>
  
  <p>How can I make a heatmap such that the colors are smooth and the full 2d space is filled with smoothed out colors based on the z values.</p>
  
  <p>Please include sample code, not just a link that will probably confuse me even more, and I've probably already visited that site anyhow. Thanks :)</p>