I am very new to R so please bear with me if something is not clear in my question.
I have a data.frame
\"protein\" with 5 columns, namely;
1.prote
For this type of thing you want to use scale_gradientn
. For example:
library(ggplot2)
x = seq(-0.1, 0.1, len=100)
y = 0:10
dat = expand.grid(x=x, y=y)
ggplot(data=dat, aes(x=x, y=y, fill=x)) +
geom_raster() +
scale_fill_gradientn(colours=c('red', 'yellow', 'cyan', 'blue'),
values = c(-0.05,-1e-32,1e-32,0.05),
breaks = c(-0.05,-0.005,0.005,0.05),
rescaler = function(x,...) x,
oob = identity)