theme_ndys: Helper function to create customized ggplot2 theme

Description Usage Arguments Examples

View source: R/plots.R

Description

theme_ndys modifies the base ggplot2 theme for figures in Leppanen et al.

Usage

1
2
3
4
5
theme_ndys(
  base_fontsize = 8,
  legend_direction = c("vertical", "horizontal"),
  panel_aspect_ratio = NULL
)

Arguments

base_fontsize

size of texts

legend_direction

the direction of the various levels of a legend key (default: "vertical")

panel_aspect_ratio

the ratio of the y and x axes on the plot

Examples

1
2
3
4
5
library(ggplot2)
ggplot(mtcars, aes(x = wt, y = mpg, colour = factor(cyl))) + 
    geom_point() + facet_grid(~ am) + 
    theme_ndys(12, "h", 1.5)
    

tdeenes/eegR documentation built on April 19, 2021, 4:17 p.m.