theme_survHE: A Custom ggplot2 Theme for Survival Plots

View source: R/utils_plot_survHE.R

theme_survHER Documentation

A Custom ggplot2 Theme for Survival Plots

Description

This theme is designed for use with survival analysis plots, particularly those created using the survHE package. It builds on theme_bw() and customizes axis text, titles, plot background, and legend styling.

Usage

theme_survHE()

Details

Note: To position the legend inside the plot, use an additional call to theme(legend.position = c(x, y), legend.justification = c("left", "top")).

Value

A ggplot2 theme object that can be added to a ggplot.

Examples

library(ggplot2)
library(survHE)
ggplot(mtcars, aes(wt, mpg)) +
 geom_point() +
 theme_survHE() +
 theme(legend.position = c(0.6, 0.8), legend.justification = c("left", "top"))

survHE documentation built on June 12, 2025, 5:09 p.m.