A wrapper function for the signs::signs function. It adds a figure space to negative numbers so that it appear as if the minus sign does not affect the number's centering.
Arguments
- x
a numeric vector
- space
a character to be added to negative numbers (defaults to a figure space)
- ...
parameters passed to signs:signs
Examples
library(ggplot2)
d <- data.frame(x = -4:0, y = -4:0)
# In these 2 plots, Compare the centering of the negative numbers on the x-axis
ggplot(d, aes(x,y))
ggplot(d, aes(x,y)) +
scale_x_continuous(labels = signs_centered)