theme_unikn: Basic unikn theme for ggplot2.

Description Usage Arguments Details See Also Examples

View source: R/plot_themes.R

Description

theme_unikn provides a basic unikn theme to use in ggplot2 commands.

Usage

1
2
3
theme_unikn(col_title = unikn::pal_seeblau[[4]], base_size = 11,
  base_family = "", base_line_size = base_size/20,
  base_rect_size = base_size/20)

Arguments

col_title

Color of title (text) elements (optional, numeric). Default: col_title = "black". Consider using col_title = unikn::pal_seeblau[[4]] in combination with black or grey data points.

base_size

Base font size (optional, numeric). Default: base_size = 11.

base_family

Base font family (optional, character). Default: base_family = "".

base_line_size

Base line size (optional, numeric). Default: base_line_size = base_size/20.

base_rect_size

Base rectangle size (optional, numeric). Default: base_rect_size = base_size/20.

Details

The theme is lightweight and no-nonsense, but somewhat opinionated (e.g., in using mostly grey scales to allow emphasizing data points with color accents).

See Also

Other plot functions: slide, xbox

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
  # Plotting iris dataset (using ggplot2, theme_unikn, and unikn colors):
  
  library("ggplot2")  # theme_unikn requires loading ggplot2 
  
  ggplot(datasets::iris) +
    geom_jitter(aes(x = Petal.Length, y = Petal.Width, color = Species), size = 3, alpha = 1/2) +
    scale_color_manual(values = usecol(pal = c(Seeblau, Peach, Seegruen))) +
    labs(title = "Iris species",
         caption = "Data from datasets::iris") + 
    theme_unikn(col_title = "black", base_size = 11)

unikn documentation built on Sept. 25, 2019, 5:02 p.m.