Skip to contents

This function applies custom styling to various elements of ggplot2 plots, including title, subtitle, caption, axis text, axis titles, and legend text and legend titles.

Usage

theme_ggswim(base_size = 12, base_family = "")

Arguments

base_size

The base font size to use for the plot elements. Default is 12.

base_family

The base font family to use for the plot elements. Default is "".

Value

A ggplot2 theme object.

Details

This function builds upon the theme_minimal() function in ggplot2 but overrides specific theme elements to provide a customized look and feel for plots.

Examples

ggswim(
  data = patient_data,
  mapping = aes(
    x = start_time,
    xend = end_time,
    y = pt_id,
    color = disease_assessment
  ),
  linewidth = 5
) +
  theme_ggswim()