R/theme_white.R

Defines functions theme_white

Documented in theme_white

#' A ggplot theme with a white background.
#' @return The function to use \code{+} in the ggplot workflow.
#' @export
#' @examples
#' datasets::mtcars %>%
#'   ggplot2::ggplot(ggplot2::aes(mpg, disp)) +
#'   ggplot2::geom_point() +
#'   theme_white()
theme_white <- function(){

    theme(
        plot.background = ggplot2::element_rect(
            fill = "white",
            color = "white"
        ),
        panel.background = ggplot2::element_rect(
            fill = "white",
            color = "white"
        ),
    )
}

Try the add2ggplot package in your browser

Any scripts or data that you put into this service are public.

add2ggplot documentation built on Feb. 7, 2020, 5:09 p.m.