plot_hd_links: Add bars marking quantiles + links between quantiles to...

View source: R/plot_utils.R

plot_hd_linksR Documentation

Add bars marking quantiles + links between quantiles to ggplot object created by plot_scat2. Used in README to demonstrate the shift function.

Description

Add bars marking quantiles + links between quantiles to ggplot object created by plot_scat2. Used in README to demonstrate the shift function.

Usage

plot_hd_links(
  p,
  sf = sf,
  q_col = "grey21",
  q_width = 0.5,
  q_size = 0.5,
  md_size = 1,
  link_col = c("darkviolet", "darkorange2"),
  link_alpha = c(0.4, 1),
  add_rect = FALSE,
  rect_alpha = NULL,
  rect_col = NULL,
  add_lab = FALSE,
  labres = 2,
  text_size = 5
)

Arguments

p

A ggplot object returned by plot_scat2. Used in README to demonstrate the shift function.

sf

A shift function for the 2 groups illustrated in p.

q_col

Colour of the bars

q_width

Length of the bars

q_size

Thickness of the bars, except for the median

md_size

Thickness of the median bar

link_col

Colour of the links between quantiles - default "darkviolet" for negative differences, "darkorange2" for postivie differences

link_alpha

Alpha transparency of the links between quantiles - default c(0.4, 1), maximum value for the median, decreasing towards the lowest value for the extreme quantiles.

add_rect

Add rectangle marking the location of the quantiles in group 1.

rect_alpha

Alpha transparency for the rectangle.

rect_col

Colour for the rectangle

add_lab

If TRUE, add labels for differences between extreme quantiles - default = FALSE

labres

Number of decimales for the labels - default = 2

text_size

Size of the labels - default = 5


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