You can try adding a white middle to scale_fill_gradient2 :
gg <- ggplot(nba.s, aes(variable, Name)) gg <- gg + geom_tile(aes(fill = rescale), colour = "white") gg <- gg + scale_fill_gradient2(low = "darkgreen", mid = "white", high = "darkred") gg <- gg + labs(x="", y="") gg <- gg + theme_bw() gg <- gg + theme(panel.grid=element_blank(), panel.border=element_blank()) gg

But you will have maximum flexibility if you respond to the response in the SO message you contacted and use scale_fill_gradientn .
EDIT (to show an example from a discussion of comments)
# change the "by" for more granular levels green_seq <- seq(-5,-2.000001, by=0.1) red_seq <- seq(2.00001, 5, by=0.1) nba.s$cuts <- factor(as.numeric(cut(nba.s$rescale, c(green_seq, -2, 2, red_seq), include.lowest=TRUE)))

The legend is far from ideal, but you can potentially exclude it or bypass it in other ways.
hrbrmstr
source share