Skip to content

Instantly share code, notes, and snippets.

@pedroj
Last active August 29, 2015 14:13
Show Gist options
  • Save pedroj/b843fbafa3af8f408972 to your computer and use it in GitHub Desktop.
Save pedroj/b843fbafa3af8f408972 to your computer and use it in GitHub Desktop.
Basic ggplot2 theme
mytheme_bw <- function (base_size = 12, base_family = "")
{
theme_grey(base_size = base_size, base_family = base_family) %+replace%
theme(axis.text = element_text(size = rel(0.8)),
axis.ticks = element_line(colour = "black"),
legend.key = element_rect(colour = "grey80"),
panel.background = element_rect(fill = "white", colour = NA),
panel.border = element_rect(fill = NA, colour = "black"),
panel.grid.major = element_line(colour = "grey90", size = 0.2),
panel.grid.minor = element_line(colour = "grey98", size = 0.4),
strip.background = element_rect(fill = "grey80",
colour = "grey50", size = 0.2))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment