Reverses all global state changes made by set_theme,
restoring ggplot2's factory theme, scale defaults, geom defaults,
stat defaults, label defaults, and base R par() settings.
Also clears all ggastrum.* and ggplot2.* options set by
ggastrum.
Details
If ggraph was enabled via set_theme(ggraph = TRUE) or
set_ggraph_defaults, this function resets ggraph edge
geom defaults to their factory values.
Font families registered by set_fonts or by the package
load hook cannot be unregistered from sysfonts; only the geom
font-family defaults and tracking options are cleared.
This function is idempotent: calling it when no ggastrum theme is active is safe and produces no errors or warnings.
Examples
if (FALSE) { # \dontrun{
set_theme()
# ... create plots with ggastrum styling ...
unset_theme() # restore ggplot2 defaults
} # }
