v1.3.1: modern theme refresh, new theme/group.mean.overlay arguments#7
Merged
Conversation
Visual refresh across all four plot types (treat / outcome / bivariate / network):
* Plain left-aligned titles at base size 11, white background for status
heatmaps, subtle major-x gridlines for trajectories, thin gray dashed
treatment-onset marker (replaces prior thick white separator).
* Multi-level discrete-status palette refreshed to a muted, perceptually
distinct sequence; binary blue cascade and continuous gradient unchanged.
* Outcome control trajectories lightened to grey75 so dense overlapping
lines no longer darken into a near-black band.
* Outcome draw order fixed: controls now render at the bottom, treated-pre
next, treated-post on top -- via three explicit geom_line layers (single
geom_line(group=id) was drawing in id order, not type order, so treated
trajectories were being covered by the control band).
* by.group / by.group.side suptitle (textGrob path) routed through the
modern title style via a new .pv_modern_top_grob helper (28 call sites).
New arguments:
* `theme = c("default", "red")`. The "red" theme activates a high-contrast
publication-paper recipe: gray control / dark-gray treated-pre /
brick-red treated-post for status and outcome plots, plus a solid black
dashed treatment-onset marker.
* `group.mean.overlay = FALSE`. When TRUE, the outcome plot dims per-unit
trajectories and overlays a heavy group-mean line plus a 10-90% quantile
ribbon per treatment-status group. Currently scoped to the main DID
continuous-outcome path.
Deprecations:
* `theme.bw = FALSE` is soft-deprecated -- still functional for backwards
compatibility but emits a one-time warning per call. The tutorial no
longer demonstrates it.
Tutorial:
* New "Themes" subsections in 01-treat and 02-outcome chapters; new red-
theme demo in 03-bivariate chapter.
* Demo of theme="red" handling all three categories (Under Control,
Under Treatment, Missing) on the capacity dataset.
* New v1.3.1 changelog entry; index version table + argument table
updated for the two new arguments.
Validation: R CMD check --as-cran on the built tarball returns Status: OK
(0 errors / 0 warnings / 0 notes). 116/116 testthat tests pass. Clean-cache
Quarto book render of all 7 chapters succeeds.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Update install table to CRAN 1.3.1 across all three rows; add CRAN release line (2026-05-13) to v1.3.1 changelog entry. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Plot-system refresh for v1.3.1. Drop-in upgrade with two opt-in arguments and a soft deprecation.
Visual refresh (all four plot types):
grey75; binary blue cascade and continuous gradient unchanged.geom_linelayers (co→tr→tr.pst). The previous singlegeom_line(group=id)drew in id order, not type order, so treated trajectories were being covered by the control band.by.group/by.group.sidesuptitle (textGrobpath) now routes through the modern title style via a new.pv_modern_top_grobhelper.New arguments:
theme = c("default", "red")— opt-in"red"theme activates a high-contrast publication-paper recipe (gray control / dark-gray treated-pre / brick-red treated-post + solid-black dashed onset marker).group.mean.overlay = FALSE— whenTRUE, dims per-unit trajectories and overlays a heavy group-mean line plus a 10–90% quantile ribbon per treatment-status group. Scoped to the main DID continuous-outcome path.Deprecations:
theme.bw = FALSEis soft-deprecated. Still functional; emits a one-time warning per call. The tutorial no longer demonstrates it.Tutorial:
Backwards compatibility:
theme.bw = FALSE(with the deprecation warning).Test plan
devtools::test()— 116/116 passR CMD check --as-cranon the built tarball — Status: OK (0 errors / 0 warnings / 0 notes, including a clean CRAN-incoming-feasibility check)quarto renderof all 7 tutorial chapters — succeeds; new figures (treat2-theme-red-*,outcome1-3*,bivar1-6b) render correctlytheme.bw = FALSEdeprecation warning, by.group title alignment🤖 Generated with Claude Code