Skip to contents

A cream-background ggplot2 theme with warm tan grid lines, warm gray facet strips, and cream strip text. Designed to pair with the solaris color palette (solaris_pal, scale_fill_solaris_c).

Usage

theme_solaris(
  base_size = 12,
  base_family = "sans",
  network = NULL,
  medium = c("screen", "print")
)

Arguments

base_size

Numeric. Base font size in points (default 12).

base_family

Character. Base font family (default "sans").

network

Logical or NULL (default). If NULL, ggraph plots are auto-detected at plot-add time and network mode is applied automatically. Pass TRUE to force network mode (no axes/grid) or FALSE to force standard mode regardless of plot type.

medium

Character. Output medium: "screen" (default) for presentations and PDF viewing, or "print" for physical printing with heavier lines and darker text.

Value

When network = NULL (default), an object of class "theme_solaris_autodetect" that resolves at + time. When network is explicitly TRUE or FALSE, a plain ggplot2 theme object.

Details

When added to a plot with +, theme_solaris() auto-detects whether the plot is a ggraph network visualization and removes axes and grid lines accordingly. Pass network = TRUE or network = FALSE to override auto-detection.

Author

Dustin Stoltz

Examples

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

# Basic usage -- auto-detects plot type
ggplot(mtcars, aes(wt, mpg)) +
  geom_point() +
  theme_solaris()

# Print-optimized with heavier lines
ggplot(mtcars, aes(wt, mpg, color = factor(cyl))) +
  geom_point(size = 3) +
  theme_solaris(medium = "print") +
  scale_color_solaris_d()
} # }