Create an xpose theme. This function will update the theme of an
xpdb object. All plots generated with this xpdb will automatically use the
defined xpose (xp_theme) and ggplot2 (gg_theme) themes.
Arguments
- xpdb
An
xpose_dataobject generated withxpose_data.- gg_theme
A complete ggplot2 theme object (e.g.
theme_classic), a function returning a complete ggplot2 theme, or a change to the currentgg_theme.- xp_theme
A complete xpose theme object (e.g.
theme_xp_default) or a list of modifications to the currentxp_theme(e.g.list(point_color = 'red', line_linetype = 'dashed')).- quiet
Logical, if
FALSEmessages are printed to the console.
Examples
# Before default theme
dv_vs_ipred(xpdb_ex_pk, facets = 'SEX')
#> Using data from $prob no.1
#> Filtering data by EVID == 0
#> `geom_smooth()` using formula = 'y ~ x'
# Updating the gg_theme and xp_theme
xpdb_ex_pk %>%
update_themes(gg_theme = theme(legend.position = 'top'),
xp_theme = list(point_color = 'blue',
line_color = 'blue')) %>%
dv_vs_ipred(facets = 'SEX')
#> Using data from $prob no.1
#> Filtering data by EVID == 0
#> `geom_smooth()` using formula = 'y ~ x'
