Internal helper to add the diagonal highlighting to a ggplot
Source:R/plot_density_helpers.R
gg_highlightDiagonals.Rd
Internal helper function to highlight diagonals in a density matrix. The function takes an existing ggplot object, adds the diagonal highlighting and returns the edited ggplot object again.
Arguments
- gg
Existing ggplot object to which the diagonal highlighting should be added.
- dat
Dataset with columns
period
andage
and the main variable specified through argumenty_var
.- dat_highlightDiagonals
Dataset created by
create_highlightDiagonalData
to highlight specific diagonals in a density matrix.