ggtheme_min: Minimal Theme for ggplot2 with Additional Options

Description Usage Arguments Note Author(s) See Also Examples

View source: R/ggtheme.R

Description

Adds a minimal theme to your ggplot object. Allows you to specify font size and family, colour of gridlines, which gridlines to draw, legend position and transparency level of legend background. Allows you to switch between white and transparent background.

Usage

1
2
3
ggtheme_min(base_size = 12, base_family = "serif", grid = "y",
  grid_colour = "grey90", legend_pos = "right", legend_bg_alpha = 0,
  transparent_bg = TRUE)

Arguments

base_size

font base size in points

base_family

font family (e.g. "sans", "serif", "mono")

grid

which grid lines to draw: "x", "y", "xy" or "n"one

grid_colour

the colour of the grid lines

legend_pos

the position of the legend; either a character specification ("left", "right", "top", "bottom") or a 2 element numeric vector giving the relative x,y position in [0,1]

legend_bg_alpha

the alpha (transparency) level of the white legend background in [0,1]

transparent_bg

switches between transparent (TRUE) and white (FALSE) plot background

Note

Forked from ggplot2 theme-defaults.r by Hadley Wickham.

Author(s)

Jonas Schoeley, Hadley Wickham

See Also

theme

Examples

1
2
3
4
library(ggplot2)
ggplot(mtcars, aes(x = wt, y = mpg)) +
  geom_point() +
  ggtheme_min()

jschoeley/ggtheme documentation built on May 20, 2019, 2:07 a.m.