ggCorpIdent: Set Corporate Identity Theme for ggplot2 graphics

Description Usage Arguments Details Examples

Description

Sets a pre-defined theme as the standard ggplot theme via theme_set and theme_bw. In addition to the specification of colors and fonts, a corporate logo (format: PNG) can be specified to serve as watermark in ggplot graphics.

Usage

1
2
3
4
5
6
7
ggCorpIdent(base_size = 12, base_family = "Lato",
  textColor = "#2b4894", panelBackgroundColor = "#d4dbde",
  tickColor = "white", legendKeyColor = "white",
  panelGridMajorColor = "white", stripTextColor = "white",
  colors = c("#2b4894", "#068587", "#F2B134", "#ED553B", "#4FB99F"),
  logo = NULL, logoPosition = "bottomright", logoSize = 1,
  logoTransparency = 0.2)

Arguments

base_size

base font size

base_family

base font family

textColor

text color for axis, labs, title and subtitle

panelBackgroundColor

color for panel background

tickColor

color for ticks

legendKeyColor

color for legend key

panelGridMajorColor

color for panel grid major

stripTextColor

color for strip text

colors

vector with corporate colors used for geoms; the colors are used according to their position in colors; if more colors are required, the values of colors will be interpolated via colorRampPalette.

logo

filename for logo; the file has to be PNG.

logoPosition

location of logo. See 'Details'.

logoSize

numeric for logo rescaling

logoTransparency

numeric alpha value to adjust logo transparency

Details

The location may be specified by a single keyword from the list "bottomright", "bottom", "bottomleft", "left", "topleft", "top", "topright", "right" and "center".

Examples

 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
## Not run: 
library(ggCorpIdent)
ggCorpIdent()

# default 'ggCorpIdent' settings:
ggplot(iris,
       aes(x = Sepal.Width, y = Petal.Width, col = Species)) +
  geom_point()

# add corporate logo
logoFromPackage <- system.file("logo/logo_INWT.png", package = "ggCorpIdent", mustWork = TRUE)
ggCorpIdent(logo = logoFromPackage,
            logoSize = 0.4)
ggplot(iris,
       aes(x = Sepal.Width, y = Petal.Width, col = Species)) +
  geom_point()

# change colors and font
ggCorpIdent(base_family = "Courier",
            colors = c("dodgerblue4", "violetred1", "mintcream"),
            logo = logoFromPackage,
            logoSize = 0.4) 
ggplot(iris,
       aes(x = Sepal.Width, y = Petal.Width, col = Species)) +
  geom_point()

## End(Not run)

INWTlab/ggCorpIdent documentation built on May 5, 2019, 8:17 a.m.