library(ggplot2)
library(reshape2)
HAVE = data.frame(VARS = c("cat", "dog", "fox", "rabbit"),
"a" = c(1,2,3,4),
"b" = c(2,3,1,4),
"c" = c(3,1,2,4))
HAVE1 = melt(HAVE, id.vars="VARS")
ggplot(HAVE1, aes(VARS, variable, fill= value)) +
geom_tile() +
scale_fill_gradient(low="white", high="blue")
I wish to produce a color map from yellow (low value) to blue (high value). I wish for the columns on top to be the 'variable' and the yticks to be VARS such as: and please note it is just an example!!




