Changelog
Source:NEWS.md
ggswimlane 0.2.0
- Default aesthetics modernized further: haloed markers, tinted (partially transparent) bar fills, and a geometric arrowhead for ongoing subjects replacing the text-based arrow.
- Figure legibility improvements: closed-status shapes and pinned shape values so mappings stay stable across plots, plus legend and axis fixes.
-
theme_swimlane()gains abase_familyargument; font handling is now documented in the gallery vignette.
ggswimlane 0.1.0
This release modernizes the package throughout. It is a breaking release: plots built against 0.0.0.9000 will need updates.
New features
-
geom_swimlane_status()marks end-of-lane status (e.g. reason off study) with shaped points and an automatic legend, replacing text annotations as the recommended default; subjects still on study are drawn as a rightward arrow with its own legend entry (#2, #3). -
geom_swimlane_marker()marks on-lane events such as responses, with an optional entry in the shared shape legend. -
geom_swimlane_rug()now draws shape-mapped points with a legend entry, and is documented honestly as a start-of-lane marker in the left margin (#1, #2). -
geom_swimlane()gains stacked-segment support: pass long data with afill_varsuch as treatment phase and segments stack in factor-level order (#4). The newweeks_on_treatmentcolumn inpatient_dispositionand the gallery vignette demonstrate this. - Plots now look polished without additional scales:
geom_swimlane()applies built-in colorblind-safe fill and shape scales (Okabe-Ito colors;scale_fill_swimlane(),scale_colour_swimlane(),scale_shape_swimlane()are also exported), andtheme_swimlane()was redesigned with a bottom legend default. - The default shape palette uses closed symbols only (solid first, then open outlines). The line-only glyphs (
+,x,*) are gone: drawn at the end of a bar, their strokes read as arrow shafts or error bars. -
geom_swimlane_status(),geom_swimlane_marker(), andgeom_swimlane_rug()draw a white halo ring beneath each glyph so that markers separate cleanly from the bars; a newhaloargument controls the ring color (NAdisables it), and newfillandstrokearguments style the glyphs themselves. The solid glyphs are now the fillable shapes 21-25, and the ongoing arrow ingeom_swimlane_status()is a solid arrowhead instead of a thin line arrow. -
scale_fill_swimlane()fills bars with a slight tint of the Okabe-Ito palette so the near-black markers stay dominant;scale_colour_swimlane()keeps the full-strength hues. -
theme_swimlane()gains abase_familyargument for setting a font family; the gallery vignette documents font handling across graphics devices. -
scale_shape_swimlane()gains avaluesargument. Shapes otherwise assign in factor-level order, so pass a named vector to pin each status to the same shape across plots. - All user-facing functions validate their column arguments and error informatively.
Breaking changes
- ggplot2 >= 3.5.0 and R >= 4.1 are now required.
-
geom_swimlane()maps subjects to the y-axis natively instead of usingcoord_flip();cohort_varis renamedfill_var. -
order_swimlane()now relevels the column passed asid_varrather than always writing the result to a column namedsubject. -
geom_swimlane_text()is removed; usegeom_swimlane_status()or its text alternativegeom_swimlane_label(), which passes...to the layer rather than treating them as aesthetics. - The magrittr pipe re-export is removed; use the native pipe
|>. - The ggtext and lubridate dependencies are dropped.