Intro Thoughts
Status Quo
library(tidyverse)
remotes::install_github("haleyjeppson/ggmosaic")
## Using GitHub PAT from the git credential store.
## Skipping install of 'ggmosaic' from a github remote, the SHA1 (4b714439) has not changed since last install.
## Use `force = TRUE` to force installation
library(ggmosaic)
titanic |>
ggplot() +
geom_mosaic(aes(x = product(Sex)))

titanic |>
ggplot() +
geom_mosaic(aes(fill = Survived, x = product("all")))

titanic |>
ggplot() +
geom_mosaic(aes(fill = Survived, x = product(Sex)))

titanic |>
ggplot() +
geom_mosaic(aes(fill = Survived, x = product(Sex)))

last_plot() +
geom_mosaic(aes(fill = Survived,
x = product("all")),
alpha = .5)

Experiment