docs: regenerate roxygen documentation for paper_bg and force params (#19)
R-CMD-check / R CMD check (pull_request) Successful in 4m29s

This commit is contained in:
2026-08-01 21:44:50 -04:00
parent f32093c662
commit 967e7e1111
7 changed files with 45 additions and 35 deletions
+10 -8
View File
@@ -17,7 +17,7 @@ theme_civilytics(
accent = unname(civilytics_colors["ember_600"]),
strip_color = unname(civilytics_colors["paper_2"]),
grid = c("y", "x", "both", "none"),
paper_bg = TRUE
paper_bg = FALSE
)
}
\arguments{
@@ -56,10 +56,12 @@ to [civilytics_colors]`["paper_2"]` (`#F2EDE4`).}
\item{grid}{Character. Which major gridlines to draw: `"y"` (default,
horizontal only), `"x"` (vertical only), `"both"`, or `"none"`.}
\item{paper_bg}{Logical. If `TRUE` (default), fill the plot and panel
backgrounds with the warm `paper` color. Set to `FALSE` for a
transparent background (useful for slides or overlay on colored
surfaces).}
\item{paper_bg}{Logical. If `TRUE`, fill the plot and panel backgrounds
with the warm `paper` color (Civilytics cream). Default is `FALSE`
(transparent) so that figures composite cleanly onto any background.
Set to `TRUE` for the branded cream canvas. Note: a transparent device
background (e.g., `dev = "ragg_png"`, `dev.args = list(background =
"transparent")`) is also needed for fully-transparent PNG exports.}
}
\value{
A complete ggplot2 [ggplot2::theme()] object.
@@ -105,7 +107,7 @@ shrinkage.
\dontrun{
library(ggplot2)
# Default editorial theme
# Default — transparent background for embedding
ggplot(mpg, aes(displ, hwy)) +
geom_point() +
theme_civilytics()
@@ -116,10 +118,10 @@ ggplot(mpg, aes(displ, hwy, colour = class)) +
scale_color_civilytics() +
theme_civilytics(grid = "both")
# Transparent background for embedding
# Branded cream background (opt-in)
ggplot(mpg, aes(displ, hwy)) +
geom_point() +
theme_civilytics(paper_bg = FALSE)
theme_civilytics(paper_bg = TRUE)
# Larger text for poster or display
ggplot(mpg, aes(displ, hwy)) +