title: heatplot ggplot2 error different behaviour between scale_fill_gradient2 and scale_fill_grey Error: Continuous value supplied to discrete scale
body: <p>I made a heatplot for a presentation in color, and now I am trying to transform it to greyscale, the problem is that when I use exactly the same code replacing scale_fill_gradient2 by scale_fill_grey it does not work. I have seen similar posts, but all of the people were actually working with discrete variables, I am working with a continuous variable.</p>
  
  <p>Here is an example dataset:</p>
  
  <pre><code>library(ggplot2)
  DF &lt;- data.frame(species = rep(c("a", "b", "c"), times= 3), variable = rep(c("Min","Max", "Mean"), each = 3), value = rnorm(9), sign = sample(c("+","-"), 9, replace = TRUE))
  </code></pre>
  
  <p>I plot this in full color and it works, here is my code for that:</p>
  
  <pre><code>p &lt;- ggplot(DF, aes(x=variable, y=species)) +  geom_tile(aes(fill=value), colour = "black") + scale_fill_gradient2(low = "blue", high = 'red') +
  theme(axis.text.x = element_text(angle = 90, hjust = 0.5, vjust = 0.5))+ geom_text(aes(label=sign), color = 'black')
  p
  </code></pre>
  
  <p>Then I thought that if I changed scale_fill_gradient2 to scale_fill_grey it would change to greyscale, but it throws an error, here is that code</p>
  
  <pre><code>p2 &lt;- ggplot(DF, aes(x=variable, y=species)) +  geom_tile(aes(fill=value), colour = "black") + scale_fill_grey(start = 0.2, end = 0.8) +
  theme(axis.text.x = element_text(angle = 90, hjust = 0.5, vjust = 0.5))+ geom_text(aes(label=sign), color = 'black')
  p2
  </code></pre>
  
  <p>The error I get is this one:</p>
  
  <pre><code>Error: Continuous value supplied to discrete scale
  </code></pre>
  
  <p>Can anyone tell me how to fix that?</p>
  
  <p>Thanks</p>