title: How to assign heatmap color range
body: <p>I want to draw a two-color heatmap with a range from <strong>-2 to 6, and 0 is in white</strong>.
  my code is giving me a symmetric color range and apparently my heatmap is too light. 
  I tried to use <code>symbreaks = F</code> but then 0 is not white; I also tried manually assign two colors but its not working either.</p>
  
  <pre><code>colfunc1 &lt;- colorRampPalette(brewer.pal(8, "Blues"))
  colfunc2 &lt;- colorRampPalette(brewer.pal(8, "Reds"))
  hmcols &lt;- c(colfunc1(25), colfunc2(25*(max(data) - 1)))
  </code></pre>
  
  <p>this is the code I used to generate the following heatmap. 
  Please advise! <strong>Thank you!</strong></p>
  
  <pre><code>heatmap.2(as.matrix(data), Colv=FALSE, scale = T, dendrogram = "row", trace = "none",
            col = hmcol, key = T, cexCol = 1.5, cexRow = 1, srtCol = 15)
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/ICcyC.png" width="400"/></p>