theme_unikn: Basic unikn theme (for ggplot2)

View source: R/plot_themes.R

theme_uniknR Documentation

Basic unikn theme (for ggplot2)

Description

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

Usage

theme_unikn(
  col_title = pal_seeblau[[4]],
  base_size = 11,
  base_family = "",
  base_line_size = base_size/22,
  base_rect_size = base_size/22
)

Arguments

col_title

Color of title (text) elements (optional, numeric). Default: col_title = pal_seeblau[[4]]. Consider using col_title = "black" when data uses Seeblau colors.

base_size

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

base_family

Base font family (optional, character). Default: base_family = "". Options include "mono", "sans" (default), and "serif".

base_line_size

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

base_rect_size

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

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

theme_grau for an alternative theme.

Other plot functions: slide(), theme_grau(), xbox()

Examples



  # Plotting iris dataset (using ggplot2, theme_unikn, and unikn colors):
  
  library('ggplot2')  # theme_unikn requires ggplot2 
  
  ggplot(datasets::iris) +
    geom_jitter(aes(x = Petal.Length, y = Petal.Width, color = Species), size = 3, alpha = 2/3) +
    scale_color_manual(values = usecol(pal = c(Pinky, Seeblau, Seegruen))) +
    labs(tag = "A", title = "Iris petals",
         caption = "Data from datasets::iris") + 
    theme_unikn()



unikn documentation built on May 29, 2024, 10:41 a.m.