View source: R/gg_add_generation_bands.R
Pass it the original ggplot, and this will return it, with the bands added
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
)
|
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(values = c(`FALSE` = NA, Impossible = "white", `TRUE` = "black")) |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.