title: geom_tile single color as 0, then color scale
body: <p>I want to produce a heat map where with a color pallet of green to red, but values of 0 are in white. I got started with <a href="https://stackoverflow.com/questions/10232525/geom-tile-heatmap-with-different-high-fill-colours-based-on-factor">geom_tile heatmap with different high fill colours based on factor</a> and others on SO but can't quite get what I need. For example, with the following database:</p>
  
  <pre><code>df &lt;- data.frame(expand.grid(1:10,1:10))
  df$z &lt;- sample(0:10, nrow(df), replace=T)
  </code></pre>
  
  <p>I can create this plot:</p>
  
  <pre><code>ggplot(df,aes(x = Var1,y = Var2,fill = z)) + 
    geom_tile() + 
    scale_fill_gradient(low = "green", high = "red")
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/D2xrz.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/D2xrz.jpg" alt="enter image description here"></a>
  But I want the values equal to zero to be white. So this gets part way there:</p>
  
  <pre><code>ggplot(df,aes(x = Var1,y = Var2,fill = z)) + 
    geom_tile() + 
    scale_fill_gradient(low="green", high="red", limits=c(1, 10))
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/PKSg7.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/PKSg7.jpg" alt="enter image description here"></a></p>
  
  <p>And this gets 0 as white but I lose the green to red:</p>
  
  <pre><code>ggplot(df,aes(x = Var1,y = Var2,fill = z)) + 
    geom_tile() + 
    scale_fill_gradient(low = "white", high = "red")
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/JZRIt.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/JZRIt.jpg" alt="enter image description here"></a></p>
  
  <p>And I can't use brewer scales at all (though I think I'm missing something simple based on the error).</p>
  
  <pre><code>ggplot(df,aes(x = Var1,y = Var2,fill = z)) + 
    geom_tile() + 
    scale_fill_brewer("Greens")
  </code></pre>
  
  <h2>Error: Continuous value supplied to discrete scale</h2>
  
  <p>Should I just replace 0 with NA? Any help would be appreciated. </p>