title: Change colors of raster plot in ggplot2
body: <p>I am trying to make a raster plot using ggplot2 rather than the raster package plot function for some irrelevant reasons.</p>
  
  <p>I would like to scale the colors so that the minimum temperature on the plot is blue and the maximum temperature on the plot is red, while the mid range is white. I have tried numerous functions from ggplot2, and I keep failing to get the desired result. This is what I want:</p>
  
  <p><img src="https://i.stack.imgur.com/yll1i.png" alt="plot showing desired color ramp from raster package"></p>
  
  <p>Here is the current state of my ggplot2 code:</p>
  
  <pre><code>library(raster)
  library(ggplot2)
  library(scales)
  
  r = raster()
  r[] = 1:ncell(r)
  
  df = as.data.frame(r, xy=TRUE)
  
  the_plot = ggplot(df) + 
    geom_raster(aes(x, y, fill=layer)) +
    scale_fill_gradient2(low=muted('red'), mid='white', high=muted('blue'))
  print(the_plot)
  </code></pre>
  
  <p>Which, rather than the desired color ramp, produces this:</p>
  
  <p><img src="https://i.stack.imgur.com/pBhmK.png" alt="ggplot2 scale_fill_gradient2() fail"></p>
  
  <p>Any suggestions are much appreciated!</p>