title: Specifying same limits for colorbar (legend) in ggplot2
body: <p>I want multiple plots to share the same color-scale.  A given value in one plot should have the same color as in the second plot.  How do I enforce this with <code>ggplot2</code>?</p>
  
  <p>Here is an example of two plots that do not share color-scales, but should:</p>
  
  <pre><code>x &lt;- matrix(1:16, 4)
  y &lt;- matrix(1:16-5, 4)
  library(reshape)
  ggplot(data = melt(x)) + geom_tile(aes(x=X1,y=X2,fill = value))
  ggplot(data = melt(y)) + geom_tile(aes(x=X1,y=X2,fill = value))
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/TFjRN.png" width="325">
  <img src="https://i.stack.imgur.com/qgfLi.png" width="325"></p>
  
  <p>These two plots look the same, but they should look different!</p>