Version 0.5.1
CRAN release: 2026-09-16
Addressed CRAN review feedback: added
\valuedocumentation to theGeomMosaic,GeomMosaicJitter,GeomMosaicText,StatMosaic,StatMosaicJitter, andStatMosaicTextggproto objects; fixed a brokenprodcalc()example (a straylibrary(productplots)call was masking itsoffsetargument) and unwrapped it; and replaced\dontrunwith\donttestfor the largergeom_mosaic()example block.Added
facet_mosaic_grid()for mosaic-aware faceting (haleyjeppson/ggmosaic#78): each facet panel gets independent x/y product scales and category axes drawn at panel-specific positions, and it supports multiple mosaic layers,theme_mosaic(),coord_flip(), manual product scales, margins, and residual shading.Mosaic layers (
geom_mosaic(),geom_mosaic_text(),geom_mosaic_jitter()) now resolve their plot mapping at build time, like ordinaryggplot2layers, so anaes()mapping added or changed after a mosaic layer has already been added is now picked up correctly instead of being frozen at the point the layer was added.Added
mosaic_settings()for sharingdivider,offset, andexpectedacross sibling mosaic layers in one plot, so multi-layer plots (e.g.geom_mosaic()+geom_mosaic_text()) no longer need the same argument repeated on every layer. An explicit layer argument, includingexpected = NULL, still overrides the plot-level setting.Improved Pearson residual shading: negative residuals are now dark red and positive residuals dark blue, with matching dashed/solid cell outlines (disable via
colour = NA, or override colour/linetype/linewidth directly). Added a custom residual legend with signed labels, observed extrema, supplied limits, reference values at -4/0/+4, endpoint colour squishing, and collision-aware ticks/labels, in both vertical and horizontal layouts.Fixed mosaic spacing:
offsetis now the fixed gap at the deepest split, with gaps increasing by a factor of 1.5 toward outer splits (previously inconsistent), converted to local rectangle coordinates and safely constrained for very small cells;offsetis validated as a single finite, non-negative value. This changes spacing output relative to earlier versions.Fixed namespace-only use (haleyjeppson/ggmosaic#82): calls such as
ggmosaic2::geom_mosaic()andggmosaic2::product()now work withoutlibrary(ggmosaic2).Variables mapped only to
filloralpha(andcolouringeom_mosaic_jitter()) remain available to the mosaic calculation and point aesthetics, but are no longer shown on the automatic product axes; only variables mapped throughxorcondsare labeled there (haleyjeppson/ggmosaic#39, haleyjeppson/ggmosaic#77). Variables can now be created withingeom_mosaic(), and factors can be reordered for display.theme_mosaic()now passes additional arguments through...toggplot2::theme().Added the
introducing-ggmosaic2vignette.Lightened the default
geom_mosaic()tile fill (grey30->grey55).Fixed
inst/CITATIONfor theggmosaic2fork: retitled fromggmosaic, authors and year are now pulled fromDESCRIPTIONinstead of hardcoded, and a broken multi-URL field is fixed.Deprecated
ggmosaic_app(), kept only for the historical record.The
introducing-ggmosaic2vignette was edited for clarity and detail.
Version 0.5.0
ggmosaic2 is a standalone continuation of ggmosaic, which was removed from CRAN around November 2025 and appeared unmaintained (the loglinear-models/residual-shading pull request below, https://github.com/haleyjeppson/ggmosaic/pull/86, was never acted on).
Rather than take over the original package name, this work continues independently as ggmosaic2, maintained by Michael Friendly, with original authors Haley Jeppson, Heike Hofmann, and Di Cook retained as authors in DESCRIPTION.
The version number picks up from the last CRAN/fork release (0.4.1) rather than resetting, since this carries forward that code and history rather than starting fresh. Everything below this entry is inherited ggmosaic history, prior to the fork.
- Fixed stale
ggmosaic::self-references left over from the rename (vignettes/ggmosaic.Rmd, the bundled Shiny apps underinst/shiny/), which broke building sinceggmosaicis no longer on CRAN. Also pointed_pkgdown.ymlat the new package’s own site.
Version 0.4.1
Extensive changes to introduce fitting loglinear models and residual-based shading, described in https://github.com/haleyjeppson/ggmosaic/pull/86
- added labeling for cells (obs/exp/res)
- added loglinear-models vignette to explain this
- added vignette on forms of frequency data
- fix error from ggmosaic vignette related to
tapply()inR/divide.R
Version 0.3.3
A geom,
geom_mosaic_jitter(), and an associated stat,stat_mosaic_jitter(), has been added.A geom,
geom_mosaic_text(), and an associated stat,stat_mosaic_text(), has been added.geom_mosaic_text()now supports using labels and ggrepel (@gregeleu, #50).A theme for mosaic plots,
theme_mosaic(), has been added.
