gta_theme: Complete theme for GTA Plots

View source: R/gta theme.R

gta_themeR Documentation

Complete theme for GTA Plots

Description

This function defines the GTA theme for ggplot. Add it at the end of a ggplot object. If you want to overwrite certain elements, simply add theme() to your plot.

Usage

gta_theme(
   base_size = 12,
   base_family = "Open Sans",
   base_line_size = base_size / 22,
   base_rect_size = base_size / 22,
   aspect_ratio = NULL
)

Arguments

base_size

base font size, given in pts.

base_family

base font family

base_line_size

base size for line elements

base_rect_size

base size for rect elements

aspect_ratio

Here, you can define the aspect ratio of the panel if needed (default is NULL)

Examples

# Create a plot with gta_theme()
df |>
    ggplot(aes(x = x, y = y, color = color)) +
    geom_line() +
    gta_theme() + # add the base theme to your plot
    theme(axis.text.x = element_text(angle = 45, color = "red", size = 20)) # if you need to deviate from the theme, simply add changes within a new theme() element

global-trade-alert/gtalibrary documentation built on April 5, 2024, 1:54 p.m.