title: How to assign multiple colour scales to a dataset in ggplot2; assign different color scale to each column variable
body: <p>I am trying to assign different colour scales to my dataset based on the column variable. The dummy code is</p>
  
  <pre><code>df1 &lt;- data.frame(ID = c('a1', 'b1', 'c1', 'd1', 'e1', 'f1'),
                    var1 = c('a', 'b', 'c', 'a', 'b', 'c'),
                    var2 = c(0.006, 0.04, .005, 0, 0.02, 0.05))
  </code></pre>
  
  <p>Instead of an overall colour scale, I want 'a' from var1 to be red to white, 'b'blue to white, and 'c' as purple to white. I have 4000 rows in my actual data, I tried to nest each on top of each other, but failed.. the running is below. Please suggest where do I need to make the changes to get my desired output.</p>
  
  <p>P.S.I know, the var2 will have different high's and lows, if legend is available, great, otherwise I just need to show color differences.</p>
  
  <pre><code>ggplot(df1,aes(y = var1, x = ID, fill = var2)) +
    geom_tile(color = "white") +
    coord_equal() +
    scale_fill_gradient(low = "steelblue", high = "white") +
    ylab("var1") +
    xlab("ID") +
    theme(legend.title = element_text(size = 10),
          legend.text = element_text(size = 12),
          plot.title = element_text(size = 16),
          axis.title = element_text(size = 14, face = "bold"),
          axis.text.x = element_text(angle = 90, hjust = 1)) +
    labs(fill = "ABC association") 
  </code></pre>