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.
gg_highlightDiagonals(gg, dat, dat_highlightDiagonals)
Existing ggplot object to which the diagonal highlighting should be added.
Dataset with columns period
and age
and the
main variable specified through argument y_var
.
Dataset created by
create_highlightDiagonalData
to highlight specific diagonals
in a density matrix.