Skip to contents

A small helper for specifying the optional vertical reference line used in dumbbell plots.

Usage

style_reference_line(
  intercept = 0.5,
  color = "gray75",
  alpha = 0.9,
  linewidth = 0.6,
  linetype = "solid"
)

Arguments

intercept

Optional numeric scalar x position for the reference line. Defaults to 0.5. Set to NULL to omit the line.

color

Line color.

alpha

Line alpha (opacity), a single numeric value between 0 and 1.

linewidth

Line width.

linetype

Line type.

Value

A named list with elements intercept, color, alpha, linewidth, and linetype.

Examples

style_reference_line()
#> $intercept
#> [1] 0.5
#> 
#> $color
#> [1] "gray75"
#> 
#> $alpha
#> [1] 0.9
#> 
#> $linewidth
#> [1] 0.6
#> 
#> $linetype
#> [1] "solid"
#> 
style_reference_line(intercept = NULL)
#> $intercept
#> NULL
#> 
#> $color
#> [1] "gray75"
#> 
#> $alpha
#> [1] 0.9
#> 
#> $linewidth
#> [1] 0.6
#> 
#> $linetype
#> [1] "solid"
#>