title: Color Gradients With ggplot
body: <p>I have some geographic x,y,z data which I plot as follows</p>
  
  <pre><code>p&lt;-ggplot(aes(x=x,y=y,fill=z),data=my_data)
  </code></pre>
  
  <p>I then apply a gradient</p>
  
  <pre><code>p&lt;-p + scale_fill_gradient(low = "pink", high = "green")
  </code></pre>
  
  <p>And then tile and display the data</p>
  
  <pre><code>p&lt;-p + geom_tile()
  p
  </code></pre>
  
  <p>This works and gives the following:</p>
  
  <p><img src="https://i.stack.imgur.com/XS4L8.png" alt="enter image description here"></p>
  
  <p>One would think then, that I could replace the <code>scale_fill_gradient()</code> call with any number of other options such as</p>
  
  <pre><code>p&lt;-p + scale_color_hue()
  p&lt;-p + scale_colour_gradientn(colours=c("#E5F5F9","#99D8C9","#2CA25F"))
  p&lt;-p + scale_colour_gradientn(colours = rainbow(7))
  p&lt;-p + scale_colour_brewer() 
  </code></pre>
  
  <p>would work.</p>
  
  <p>But they don't, all I get is a gradient of blue.</p>
  
  <p>Any thoughts as to why this might be, and how I can generate lots of happy colours?</p>