add_sf_lab: Add difference labels to shift function

View source: R/plot_utils.R

add_sf_labR Documentation

Add difference labels to shift function

Description

Add labels of quantile difference values to one or more shift function plots. Used in the README.md file to illustrate the shift function. Assumes an odd number of quantiles with the median in the middle.

Usage

add_sf_lab(
  p,
  sf,
  labres = 2,
  link_col = c("darkviolet", "darkorange2"),
  link_alpha = c(0.4, 1),
  y_lab_nudge = 0,
  text_size = 5
)

Arguments

p

A list of ggplot objects generated by plot_sf or plot_pbsf.

sf

A list of data frames generated by shifthd, shiftdhd, shifthd_pbci or shiftdhd_pbci.

labres

Number of decimales for the labels - default = 2.

link_col

Label colours for negative and positive values.

link_alpha

Alpha transparency of the labels - default = continuum between 0.4 and 1.

y_lab_nudge

Amount by which to nudge the labels along the y axis.

text_size

Text size - default = 5


GRousselet/rogme documentation built on Nov. 12, 2022, 4:38 a.m.