get_theme: Retrieve a list of thematic elements

Description Usage Arguments

View source: R/themes.R

Description

This function retrieves a list of thematic elements to be used by the doc_plot function. The elements correspond to either a given theme (such as from the ggplot2 or ggthemes packages) or a custom theme with relevant parameters also given.

Usage

1
2
3
4
5
6
7
get_theme(theme = "gray", base_size = NA, base_family = NA,
  horizontal = NA, dkpanel = NA, stata = NA, gray_bg = NA,
  bgcolor = NA, nomargin = NA, ff = NA, fc = NA, fs = NA, gM = NA,
  gm = NA, gc = NA, gl = NA, boxes = NA, bc = NA, pc = NA,
  lp = NA, axis = NA, light = NA, scheme = NA, ticks = NA,
  color = NA, title_family = NA, bg = NA, fg = NA, cex = NA,
  fill = NA, col = NA, lwd = NA, lty = NA)

Arguments

theme

character. Theme from the ggplot2 or ggthemes packages. Defaults to 'gray'.

base_size

base font size

base_family

base font family

horizontal

logical. Horizontal axis lines?

dkpanel

logical Darker background for panel region?

stata

logical Use RGB values from Stata's economist scheme.

gray_bg

logical If TRUE, use gray background, else use white background.

bgcolor

The background color of plot. One of 'default', 'darkunica', the names of values in ggthemes_data$hc$bg.

nomargin

suppress the white space around the plot (boolean)

ff

font family, like sans. Deprecated: use base_family instead.

fc

font color (name or hexa code)

fs

font size (integer). Deprecated: use base_size instead.

gM

major grid (boolean)

gm

minor grid (boolean)

gc

grid color (name or hexa code)

gl

grid line type (lty)

boxes

to render a border around the plot or not

bc

background color (name or hexa code)

pc

panel background color (name or hexa code)

lp

legend position

axis

axis angle as defined in par(les)

light

logical. Light or dark theme?

scheme

One of "s2color", "s2mono", "s1color", "s1rcolor", or "s1mono", "s2manual", "s1manual", or "sj"

ticks

logical Show axis ticks?

color

The background color of plot. One of 'brown', 'gray', 'green', 'blue', the names of values in ggthemes_data$wsj$bg.

title_family

Plot title font family.

bg

character. Background color for documentation.

fg

character. Foreground/font color.

cex

numeric. Font size multiplier.

fill

character. Background color for plot.

col

character. Border color.

lwd

numeric. Border line width.

lty

character, numeric. Border line type. Accepts numbers 0, 1, 2, 3, 4, 5, 6 or characters "blank", "solid", "dashed", "dotted", "dotdash", "longdash", or "twodash".


joshuaadampoirier/ggdocumentation documentation built on May 19, 2019, 8:54 p.m.