define color gradient for negative and positive values scale_fill_gradientn()
问题 R version 3.1.1 (2014-07-10) Platform: i386-w64-mingw32/i386 (32-bit) I am working on a heatmap with ggplot2() values from -1 to +1. I want to achieve that negative values have a bluish gradiend from darkblue(-1) to lightblue(-0.00000001) and the positive values a redish one from lightred(0.00000001) to darkred(1). Small values should not fade into white, as zeros should have white color and there shall be a visible contrast between 0 and a small value. NA values should be grey. I tried scale