ggplot2_themes: Custom ggplot2 themes.

Description Usage Arguments

Description

Base ggplot2 themes for paper figures and poster figures. All arguments are passed on to ggplot2::theme().

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
theme_paper(base_size = 10, legend.key.size = ggplot2::unit(0.09,
  "in"), legend.title = ggplot2::element_blank(),
  axis.title.x = ggplot2::element_blank(),
  axis.text.x = ggplot2::element_text(size = 8),
  axis.ticks.x = ggplot2::element_blank(),
  axis.line.x = ggplot2::element_line(color = "black"),
  axis.line.y = ggplot2::element_line(color = "black"),
  plot.title = ggplot2::element_text(hjust = 0.5),
  strip.background = ggplot2::element_blank(), ...)

theme_paper_nhg(base_size = 10, text = element_text(family =
  "NeueHaasGroteskText"), legend.key.size = ggplot2::unit(0.09, "in"),
  legend.title = ggplot2::element_blank(),
  axis.title.x = ggplot2::element_blank(),
  axis.text.x = ggplot2::element_text(size = 8),
  axis.ticks.x = ggplot2::element_blank(),
  axis.line.x = ggplot2::element_line(color = "black"),
  axis.line.y = ggplot2::element_line(color = "black"),
  plot.title = ggplot2::element_text(hjust = 0.5),
  strip.background = ggplot2::element_blank(), ...)

theme_poster(base_size = 15,
  strip.background = ggplot2::element_blank(),
  panel.background = ggplot2::element_blank(),
  panel.grid.minor = ggplot2::element_line(color = "grey93"),
  plot.background = ggplot2::element_rect(fill = "transparent", color =
  NA), ...)

Arguments

base_size

base font size

legend.key.size

size of legend keys (unit); key background height & width inherit from legend.key.size or can be specified separately

legend.title

title of legend (element_text(); inherits from title)

axis.title.x

labels of axes (element_text()). Specify all axes' labels (axis.title), labels by plane (using axis.title.x or axis.title.y), or individually for each axis (using axis.title.x.bottom, axis.title.x.top, axis.title.y.left, axis.title.y.right). axis.title.*.* inherits from axis.title.* which inherits from axis.title, which in turn inherits from text

axis.text.x

tick labels along axes (element_text()). Specify all axis tick labels (axis.text), tick labels by plane (using axis.text.x or axis.text.y), or individually for each axis (using axis.text.x.bottom, axis.text.x.top, axis.text.y.left, axis.text.y.right). axis.text.*.* inherits from axis.text.* which inherits from axis.text, which in turn inherits from text

axis.ticks.x

tick marks along axes (element_line()). Specify all tick marks (axis.ticks), ticks by plane (using axis.ticks.x or axis.ticks.y), or individually for each axis (using axis.ticks.x.bottom, axis.ticks.x.top, axis.ticks.y.left, axis.ticks.y.right). axis.ticks.*.* inherits from axis.ticks.* which inherits from axis.ticks, which in turn inherits from line

axis.line.x

lines along axes (element_line()). Specify lines along all axes (axis.line), lines for each plane (using axis.line.x or axis.line.y), or individually for each axis (using axis.line.x.bottom, axis.line.x.top, axis.line.y.left, axis.line.y.right). axis.line.*.* inherits from axis.line.* which inherits from axis.line, which in turn inherits from line

axis.line.y

lines along axes (element_line()). Specify lines along all axes (axis.line), lines for each plane (using axis.line.x or axis.line.y), or individually for each axis (using axis.line.x.bottom, axis.line.x.top, axis.line.y.left, axis.line.y.right). axis.line.*.* inherits from axis.line.* which inherits from axis.line, which in turn inherits from line

plot.title

plot title (text appearance) (element_text(); inherits from title) left-aligned by default

strip.background

background of facet labels (element_rect(); inherits from rect). Horizontal facet background (strip.background.x) & vertical facet background (strip.background.y) inherit from strip.background or can be specified separately

...

additional element specifications not part of base ggplot2. If supplied validate needs to be set to FALSE.

text

all text elements (element_text())

panel.background

background of plotting area, drawn underneath plot (element_rect(); inherits from rect)

panel.grid.minor

grid lines (element_line()). Specify major grid lines, or minor grid lines separately (using panel.grid.major or panel.grid.minor) or individually for each axis (using panel.grid.major.x, panel.grid.minor.x, panel.grid.major.y, panel.grid.minor.y). Y axis grid lines are horizontal and x axis grid lines are vertical. panel.grid.*.* inherits from panel.grid.* which inherits from panel.grid, which in turn inherits from line

plot.background

background of the entire plot (element_rect(); inherits from rect)


ricompute/ricomisc documentation built on May 24, 2019, 6:18 a.m.