Skip to contents

Creates a consistent theme for all plots in ACMR reports with specific styling for backgrounds, grids, text, legends, and other plot elements.

Usage

theme_acmr(
  basesize = 9,
  bg_color = "#f6f6f6",
  panel_color = "#efefef",
  grid_color = "#c8c8c8"
)

Arguments

basesize

Base font size for the theme. Must be a positive number.

bg_color

Background color for the plot. Default "#f6f6f6".

panel_color

Panel background color. Default "#efefef".

grid_color

Grid line color. Default "#c8c8c8".

Value

A ggplot2 theme object that can be added to a ggplot

Examples

if (FALSE) { # \dontrun{
library(ggplot2)

# Basic usage
ggplot(mtcars, aes(x = wt, y = mpg)) +
  theme_acmr() +
  geom_point()

# Custom base size
ggplot(mtcars, aes(x = wt, y = mpg)) +
  theme_acmr(basesize = 12) +
  geom_point()

# Custom colors
ggplot(mtcars, aes(x = wt, y = mpg)) +
  theme_acmr(bg_color = "white", panel_color = "#f0f0f0") +
  geom_point()} # }