R/cowplots.R

Defines functions nicecow

Documented in nicecow

##' nicer cowplot
##'
##' nicer cows
##' @title nicify cowplot theme
##' @param p plot object
##' @return nicer plot object
##' @examples
##' library(ggplot2)
##' library(cowplot)
##' df <- data.frame(x=rnorm(1000),y=rnorm(1000))
##' p <- ggplot(df, aes(x=x,y=y)) + geom_point() + geom_density2d() + ggtitle("2D data")
##' p
##' nicecow(p)
##' @author Chris Wallace
##' @export
nicecow <- function(p)
  p +
    theme_cowplot() +
    theme(plot.title=element_text(hjust=0)) +
    background_grid()
chr1swallace/random-functions documentation built on March 6, 2021, 10:56 a.m.