ggblanket
ggblanket copied to clipboard
facet_switch: add in facet_switch
theme(strip.placement = "outside") + theme(strip.switch.pad.grid = unit(7.5, "pt")) + theme(strip.switch.pad.wrap = unit(7.5, "pt"))
https://github.com/tidyverse/ggplot2/issues/4973
Would be good to support, but the theme stuff is difficult
penguins |>
tidyr::drop_na() |>
mutate(sex = str_to_sentence(sex)) |>
gg_point(
x = flipper_length_mm,
y = body_mass_g,
col = island,
x_breaks = scales::breaks_pretty(3),
y_breaks = scales::breaks_width(1500)
) +
facet_grid(cols = vars(species),
rows = vars(sex),
switch = "y") +
theme(strip.switch.pad.grid = unit(2, "mm"))
Leave as is