center_limits | R Documentation |
This a function factory that allows the centering of scales around a certain value while still including all values. Convenient for centering log2 fold change limits around zero.
center_limits(around = 0)
around |
A |
A function
that takes limits and returns expanded limits
centered at the around
argument.
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())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.