title: controlling tick limits and direction in scale_colour_gradient in ggplot2 in R?
body: <p>I am using <code>scale_colour_gradient</code> with a <code>limits=</code> argument and a transformation to a log scale. I want the scale gradient to end exactly in those ticks, and have the ticks face outward rather than inward. Is this possible? </p>
  
  <p>For example:</p>
  
  <pre><code>ggplot(iris) + 
    geom_point(aes(x=Sepal.Width, y=Sepal.Length, colour=Sepal.Length)) + 
    scale_colour_gradient(limits=c(3,8), trans=log2_trans())
  </code></pre>
  
  <p>I'd like the scale to start exactly at 3 (i.e. show no colors with values less than 3) and end exactly at 8 (show no values higher than 8) and have the ticks facing outward (preferably only on the right side of the scale, like in <a href="http://4.bp.blogspot.com/-c0ERyVMySF4/T8uv0r32JEI/AAAAAAAAAB0/C2peEeGZXAI/s400/Heatmap6.png" rel="nofollow">this figure</a> except not horizontal). The limits are important since in real data sometimes you clip values based on a cutoff and want to colour only the points that are in that range, so it's confusing to have a scale bar that shows colors outside the range (since points were selected to be in that range only.)</p>