powered by
Function to ensure that a position scale is symmetric about 0
symmetric_range(range)
range of the data
symmetric range
# NOT RUN { library(ggplot2) ggplot(mpg, aes(cty, hwy)) + geom_point() + scale_x_continuous(limits = symmetric_range) # }
Run the code above in your browser using DataLab