Learn R Programming

unikn (version 0.2.0)

theme_unikn: Basic unikn theme for ggplot2.

Description

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

Usage

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

Run this code
# NOT RUN {
# }
# NOT RUN {
  # 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)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab