gg_add_generation_bands: Add bands of transparent colors to denote generations on...

Description Usage Arguments

View source: R/gg_add_generation_bands.R

Description

Pass it the original ggplot, and this will return it, with the bands added

Usage

1
2
3
4
5
6
7
gg_add_generation_bands(
  g,
  L,
  alpha = 0.2,
  colors = c("red", "orange", "yellow", "green", "blue"),
  add_impossibles = FALSE
)

Arguments

g

the original ggplot

L

the number of rows (or columns) in the ancestor-match matrices

alpha

the transparency to use for these color-bands

colors

the colors in order of self, parent, grandparent, etc. By default it is just rainbow order starting from red.

add_impossibles

pass TRUE if you want to blot out the cells that are not possible because they conflict with the sex of the individuals. You set the fill of the impossibles with a scale_fill_manual() in the main ggplot call. i.e.,

scale_fill_manual(values = c(`FALSE` = NA, Impossible = "white", `TRUE` = "black"))

CKMRpop documentation built on July 17, 2021, 5:07 p.m.