Skip to contents

Custom ggplot2 theme function

Usage

theme_hmsid(
  base_size,
  text_size,
  subtitle_size,
  subtitle_margin,
  plot_title_size,
  plot_title_margin,
  ...
)

Arguments

base_size

base font size

text_size

plot text size

subtitle_size, subtitle_margin

plot subtitle size and margin

plot_title_size, plot_title_margin

plot title size and margin

...

Other arguments passed to theme_hmsid

Value

A customized theme for a ggplot object.

Examples

if (FALSE) { # \dontrun{
library(ggplot2)
dat <- data.frame(
  x = seq_along(1:5),
  y = rnorm(n = 5, mean = 0.5, sd = 1)
)
dat |>
  ggplot(aes(x = x, y = y)) +
  geom_line() +
  theme_hmsid()
} # }