Add a horizontal (using yintercept
) or vertical (using xintercept
)
reference line.
Arguments
- xintercept, yintercept
numeric(1)
. Value denoting x- or y-axis cutoff. Use eitherxintercept
oryintercept
, but not both.
Examples
## x-axis line.
geom <- acid_geom_abline(xintercept = 1L)
print(geom)
#> mapping: xintercept = ~xintercept
#> geom_vline: na.rm = FALSE
#> stat_identity: na.rm = FALSE
#> position_identity
## y-axis line.
geom <- acid_geom_abline(yintercept = 1L)
print(geom)
#> mapping: yintercept = ~yintercept
#> geom_hline: na.rm = FALSE
#> stat_identity: na.rm = FALSE
#> position_identity