title: tweaking scale heatmap with ggplot2
body: <p>I am a complete newbie with <code>R</code> and please forgive me if this already has been asked a gazillion times. I am trying to make a <code>heatmap</code> using <code>R</code>, following this <a href="http://learnr.wordpress.com/2010/01/26/ggplot2-quick-heatmap-plotting/" rel="nofollow">example</a>, which are <code>tsvs</code>.</p>
  
  <p>This is an example. </p>
  
  <pre><code>name sam1 sam2
  a     0.2  0
  b     0.1  0.05
  c     0.3  0.06
  </code></pre>
  
  <p>Sorry, I can not post the graph that I get (because I am a newbie). </p>
  
  <p>When the graph is made the scale is between 0 to 1 (the data is rescaled between 0 to 1 in <code>heatmap</code>), however I do not have any values bigger than 0.3 in my files, hence I want to know if it is possible to have a scale between 0  to 0.3 in <code>heatmap</code>. I am not sure if I am providing enough details here, please let me know if I need to put in some more details here. </p>
  
  <p>basically I am using</p>
  
  <pre><code>a &lt;- read.table(file = "name", sep ="\t", header =T) 
  
  a.m &lt;- melt(a)
  
  a.m &lt;- ddply(a.m, .(variable), transform,  rescale = rescale(value))
  
  (p &lt;- ggplot(a.m, aes(variable, transposons)) + 
        geom_tile(aes(fill = rescale), colour = "yellow") + 
        scale_fill_gradient(low = "yellow",  high = "darkgreen"))
  </code></pre>
  
  <p>Any help is most appreciated, thanks in advance.    </p>