symmetric_range: symmetric_range

Description Usage Arguments Value Examples

View source: R/symmetric_scale.r

Description

Function to ensure that a position scale is symmetric about 0

Usage

1

Arguments

range

range of the data

Value

symmetric range

Examples

1
2
3
4
library(ggplot2)
ggplot(mpg, aes(cty, hwy)) + 
geom_point() +
  scale_x_continuous(limits = symmetric_range)

Example output

Loading required package: gridExtra
Loading required package: ggplot2

egg documentation built on July 13, 2019, 9:03 a.m.