Skip to contents

A customized ggplot2 theme based on theme_bw() with Palatino font family, adjusted grid lines, and centered plot elements. Designed for professional publications and presentations of VAR model results.

Usage

ftheme_tidyMacro(base_size = 14)

Arguments

base_size

Numeric. Base font size in points. Default is 14. All other text sizes are scaled relative to this value. The plot title will be 1.5 times the base size.

Value

A ggplot2 theme object that can be added to ggplot2 plots.

The theme inherits from theme_bw() and modifies specific elements to create a consistent visual style suitable for economic time series and impulse response function plots.

Note

The Palatino font family must be available on your system for proper rendering. If Palatino is not available, ggplot2 will fall back to the default font family. On most systems, you can check available fonts using extrafont::fonts() after loading the extrafont package.

Examples

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

# Basic usage with default base size
ggplot(mtcars, aes(x = wt, y = mpg)) +
  geom_point() +
  labs(title = "Miles per Gallon vs Weight") +
  ftheme_tidyMacro()

# Customize base size
ggplot(mtcars, aes(x = wt, y = mpg, color = factor(cyl))) +
  geom_point(size = 3) +
  labs(title = "MPG vs Weight by Cylinders",
       x = "Weight (1000 lbs)",
       y = "Miles per Gallon") +
  scale_color_tidyMacro() +
  ftheme_tidyMacro(base_size = 16)
} # }