| theme_xaringan_set_defaults(text_color, background_color, accent_color, accent_secondary_color) | theme_xaringan_set_defaults(text_color, background_color, accent_color, accent_secondary_color) | ||||
| } | } | ||||
| ggplot2::theme( | |||||
| theme <- ggplot2::theme( | |||||
| line = ggplot2::element_line(color = blend(0.2)), | line = ggplot2::element_line(color = blend(0.2)), | ||||
| rect = ggplot2::element_rect(fill = background_color), | rect = ggplot2::element_rect(fill = background_color), | ||||
| text = ggplot2::element_text( | text = ggplot2::element_text( | ||||
| color = blend(0.3) | color = blend(0.3) | ||||
| ) | ) | ||||
| ) | ) | ||||
| if (utils::packageVersion("ggplot2") >= package_version("3.3.0")) { | |||||
| theme + ggplot2::theme(plot.title.position = "plot") | |||||
| } else theme | |||||
| } | } | ||||
| #' Set and Restore ggplot2 geom Defaults | #' Set and Restore ggplot2 geom Defaults |