From 0d523c83dee72861feb421a374422217c5de1cdd Mon Sep 17 00:00:00 2001 From: kodor Date: Sat, 4 Jul 2026 23:36:46 -0400 Subject: [PATCH] fix: address review round 1 for #7 --- R/theme.R | 3 +++ tests/testthat/test_theme.R | 1 + 2 files changed, 4 insertions(+) diff --git a/R/theme.R b/R/theme.R index 5d49f3c..24ad007 100644 --- a/R/theme.R +++ b/R/theme.R @@ -87,6 +87,9 @@ #' ggplot(mpg, aes(displ, hwy)) + #' geom_point() + #' theme_civilytics(font_size = 18) +#' +#' # Note: for fully-transparent PNGs, also set a transparent device +#' # background (e.g. `ggsave("plot.png", bg = NA)`). #' } theme_civilytics <- function( font_size = 14, diff --git a/tests/testthat/test_theme.R b/tests/testthat/test_theme.R index 1cd65cf..0213c91 100644 --- a/tests/testthat/test_theme.R +++ b/tests/testthat/test_theme.R @@ -137,6 +137,7 @@ test_that("theme_civilytics has transparent background by default", { th <- theme_civilytics() expect_true(is.na(th$plot.background$fill)) expect_true(is.na(th$panel.background$fill)) + expect_null(th$legend.background$fill) }) test_that("theme_civilytics paper_bg=TRUE opt-in fills with cream", {