title: How to change the color key value in heatmap.2?
body: <p><img src="https://i.stack.imgur.com/PLdKd.png" alt="enter image description here"></p>
  
  <p>As the above screenshot showed, I used the function <code>heatmap.2()</code> here.</p>
  
  <p>how can I change '<strong>Value</strong>' in the color coded bar to <strong>any other name</strong>?</p>
  
  <p>One can just use the data from gplots package:</p>
  
  <pre><code> library(gplots)
  
   data(mtcars)
  
   x  &lt;- as.matrix(mtcars)
  
   rc &lt;- rainbow(nrow(x), start=0, end=.3)
  
   cc &lt;- rainbow(ncol(x), start=0, end=.3)
  
   heatmap.2(x, key=TRUE)
  </code></pre>
  
  <p>Many thanks :-)</p>