Skip to contents

Sets the tidyMacro theme and color scales as the default for all subsequent ggplot2 plots in the current R session. This is convenient when creating multiple plots with consistent styling.

Usage

set_tidyMacro_theme(base_size = 14)

Arguments

base_size

Numeric. Base font size for the theme. Default is 14.

Value

Invisibly returns NULL. Called for side effects.

Details

This function modifies the default ggplot2 theme and discrete color/fill scales for the current session. All plots created after calling this function will automatically use the tidyMacro styling unless explicitly overridden.

To revert to ggplot2 defaults, use ggplot2::theme_set(ggplot2::theme_gray()) and remove the scale defaults with ggplot2::update_geom_defaults().

Examples

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

# Set tidyMacro as default theme for the session
set_tidyMacro_theme()

# All subsequent plots will use tidyMacro styling
ggplot(mtcars, aes(x = wt, y = mpg, color = factor(cyl))) +
  geom_point()

# Revert to ggplot2 defaults
theme_set(theme_gray())
} # }