ggthemr: Style ggplot2

Description Usage Arguments Value Author(s) Examples

View source: R/ggthemr.R

Description

ggthemr provides colour schemes and layouts for ggplot2.

Set theme to be applied to all subsequent ggplots.

Usage

1
2
3
ggthemr(palette = "dust", layout = "clear", spacing = 1.6,
  text_size = 12, type = "inner", line_weight = 0.5, pos = 1,
  envir = as.environment(pos), set_theme = TRUE)

Arguments

palette

Colour scheme by name or ggtheme object.

layout

The layout of gridlines, axes etc.

spacing

A numeric value of how much space should exist on any given plot. Low values will result in more cramped plots, higher values will have more whitespace.

text_size

base text size.

type

Set to 'inner' where the background colour should not extend past strictly the plot area (or "panel" in ggplot2 terminology). 'outer' will apply the background colour to the entire plot.

line_weight

The thickness of axes lines and gridlines. Useful for saving plots at different resolutions.

pos

Where the new scales are stored.

envir

The environment where the new scales are stored.

set_theme

If TRUE (default), the default theme, geoms and scales are updated.

Value

Returns a list with a ggplot2 theme object, aesthetic parameters for geoms, scale functions and input parameters

Author(s)

Ciaran Tobin

Examples

1
 ggthemr('pale', layout = 'scientific', spacing = 2, type = 'inner')

cttobin/ggthemr documentation built on April 18, 2018, 11:36 p.m.