title: ggplot2 heatmap with fixed scale colorbar between graphs
body: <p>I need to draw 3 different plots setting the same scale range color.
  I have 3 matrices with different range of values. </p>
  
  <p>For example:  </p>
  
  <pre><code>range(matrixA) 
  # 0.60 0.85  
  range(matrixB) 
  # 0.65 0.95  
  range(matrixA) 
  # 0.5 1.0
  </code></pre>
  
  <p>I would like to have the same color fill for the plots. For example, for all 0.8 value in the difference plots, if in the first plot 0.8 orange, I want all 0.8 value in different graphs to be the same orange. </p>
  
  <p>My problem in this moment is:</p>
  
  <p>In the first plot, the color of the max value is red, then the value 0.85 is red.</p>
  
  <p>In the second plot, the max value is red but in this case the max value is 0.95 and the problem arises. </p>
  
  <p>My code: </p>
  
  <pre><code>mat.melted &lt;- melt(matrixA)
  colnames(mat.melted) &lt;- c("p","c","v")
  p &lt;- ggplot(mat.melted, aes(x=c,y=p,fill=v) + 
           geom-tile() + 
           scale_fill_gradintn(limits = c(min(as.vector(matrixA)), max(as.vector(matrixA))), 
                               colors = c("yellow","orange","red"))
  </code></pre>