R/theme-solid.R

Defines functions theme_solid

Documented in theme_solid

#' Theme with nothing other than a background color
#'
#' Theme that removes all non-geom elements (lines, text, etc),
#' This theme is when only the geometric objects are desired.
#'
#' @param base_size Base font size.
#' @param base_family Ignored, kept for consistency with \code{\link{theme}()}.
#' @param fill Background color of the plot.
#' @family themes
#' @example inst/examples/ex-theme_solid.R
#' @export
theme_solid <- function(base_size = 12, base_family = "", fill = NA) {
  theme_foundation() +
  theme(line = element_blank(),
        text = element_blank(),
        rect = element_rect(fill = fill, linewidth = base_size, colour = NA,
                            linetype = 0))
}

Try the ggthemes package in your browser

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

ggthemes documentation built on May 29, 2024, 10:37 a.m.