center_limits(5)(c(3,8))
g <- ggplot(iris,
aes(Sepal.Width, Sepal.Length,
colour = log2(Petal.Width / Petal.Length))) +
geom_point() +
scale_colour_gradient2(limits = center_limits())
Run the code above in your browser using DataLab