title: Using two scale colour gradients ggplot2
body: <p>If any, I think there must be a very easy solution for this. I have two large dataframes that basically look like these:</p>
  
  <pre><code>&gt; data1[1,]
        chromosome start    end      test ref position log2      p.value 
  13600 Y          10199251 10200750 533  616 10200000 0.2181711 0.00175895   
  ...
  
  &gt; data2[1,]
        chromosome start    end      test ref position log2       p.value 
  4080  Y          10197501 10202500 403  367 10200000 0.04113596 0.3149926   
  ...
  </code></pre>
  
  <p>I'm using this code to plot the two dataframes into the same graph:</p>
  
  <pre><code>p &lt;- ggplot() + geom_point(data=subset(data1, p.value &gt;= glim[1]),
  map=aes(x=position, y=log2, colour=p.value))
  + geom_point(data=subset(data2, p.value &gt;= glim[1]), map=aes(x=position,
  y=log2, colour=p.value))
  </code></pre>
  
  <p>When I was plotting single dataframes, I was using a red-white color gradient for the values in "p.value" column. Using this  line:</p>
  
  <pre><code>p &lt;- p + scale_colour_gradient(limits=glim, trans='log10', low="red", 
  high="white") 
  </code></pre>
  
  <p>The central issue is: Now with two dataframes, how can I set one color gradient for data1 and another for data2? I read in a previous post that it is not possible to use two different colour scales(ej. "low=" for the first, and "high=" for the second), but in this case is exactly the same kind of colour scale (If I'm not mixing up terminology). The syntax obviously is not correct but I'd like to do something like this:</p>
  
  <pre><code>p &lt;- p + scale_colour_gradient(limits=glim, trans='log10', low="red", 
  high="white") 
  
  p &lt;- p + scale_colour_gradient(limits=glim, trans='log10', low="blue", 
  high="white") 
  </code></pre>