title: Label minimum and maximum of scale fill gradient legend with text: ggplot2
body: <p>I have a plot created in <code>ggplot2</code> that uses <code>scale_fill_gradientn</code>. I'd like to add text at the minimum and maximum of the scale legend. For example, at the legend minimum display "Minimum" and at the legend maximum display "Maximum". There are posts using discrete fills and adding labels with numbers instead of text (e.g. <a href="https://stackoverflow.com/questions/20808881/add-custom-numbers-to-ggplot-legend">here</a>), but I am unsure how to use the <code>labels</code> feature with <code>scale_fill_gradientn</code> to only insert text at the min and max.  At the present I am apt to getting errors: </p>
  
  <pre><code>Error in scale_labels.continuous(scale, breaks) : 
  Breaks and labels are different lengths
  </code></pre>
  
  <p>Is this text label possible within ggplot2 for this type of scale / fill? </p>
  
  <pre><code># The example code here produces an plot for illustrative purposes only.
  # create data frame, from ggplot2 documentation
  df &lt;- expand.grid(x = 0:5, y = 0:5) 
  df$z &lt;- runif(nrow(df))
  
  #plot
  ggplot(df, aes(x, y, fill = z)) + geom_raster() + 
  scale_fill_gradientn(colours=topo.colors(7),na.value = "transparent")
  </code></pre>