Skip to content

Instantly share code, notes, and snippets.

@jmozmoz
jmozmoz / ggplot2 theme_minimal
Created October 30, 2012 16:54 — forked from low-decarie/ggplot2 theme_minimal
This works with ggplot2 0.9.2.1
library(grid)
theme_minimal <- function (base_size = 12, base_family = "")
{
theme_bw(base_size = base_size, base_family = base_family) %+replace%
theme (
axis.text.x = element_text(family = base_family, size = base_size * 0.8, lineheight = 0.9, vjust = 1, angle=0),
axis.text.y = element_text(family = base_family, size = base_size * 0.8, lineheight = 0.9, hjust = 1, angle=0),
axis.ticks = element_line(colour = "black", size = 0.2),
axis.title.x = element_text(family = base_family, size = base_size, vjust = 0, angle=0),