R/gg_helpers.R

Defines functions facet_ theme_

# Themes ----

#' @family gg_helpers
#' @export
facet_ <- function(facets = . ~ ., ...) {
    facet_grid(facets = facets, switch = "y", labeller=as_labeller(ggplot2:::firstUpper))
}

#' @family gg_helpers
#' @export
theme_ <- function() {
    cowplot::theme_cowplot() +
        theme(
            rect = element_rect(linetype=1),
            strip.background = element_rect(fill="white", size=1, color="black"),
            legend.box.just = "center",
            legend.text.align = 0.5)
}
mbadge/vizR documentation built on May 27, 2019, 1:08 p.m.