three_col_fun <- makeLinearNColorGradientFunction( colors = c("blue", "white", "red"),
x.min = 0,
x.max = 100 )
three_col_mat <- t( sapply( c(0, 25, 50, 75, 100 ) ,three_col_fun ) )
Run the code above in your browser using DataLab