##' 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()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.