# make plot look like default ggplots
library(ggplot2)
fit <- baggr(schools)
baggr_theme_set(theme_grey())
baggr_plot(fit)
# use baggr_theme_get to return theme elements for current theme
qplot(mtcars$mpg) + baggr_theme_get()
# update specific aspect of theme you are interested in
baggr_theme_update(text = element_text(family = "mono"))
# undo that silliness
baggr_theme_update(text = element_text(family = "serif"))
# update and replace are similar, but replace overwrites the
# whole element, update just edits the aspect of the element
# that you give it
# this will error:
# baggr_theme_replace(text = element_text(family = "Times"))
# baggr_plot(fit)
# because it deleted everything else to do with text elements
Run the code above in your browser using DataLab