ggblanket icon indicating copy to clipboard operation
ggblanket copied to clipboard

facet_switch: add in facet_switch

Open davidhodge931 opened this issue 1 year ago • 3 comments

theme(strip.placement = "outside") + theme(strip.switch.pad.grid = unit(7.5, "pt")) + theme(strip.switch.pad.wrap = unit(7.5, "pt"))

davidhodge931 avatar Aug 31 '22 20:08 davidhodge931

https://github.com/tidyverse/ggplot2/issues/4973

davidhodge931 avatar Sep 01 '22 03:09 davidhodge931

Would be good to support, but the theme stuff is difficult

davidhodge931 avatar Sep 01 '22 04:09 davidhodge931

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"))

davidhodge931 avatar Sep 02 '22 02:09 davidhodge931

Leave as is

davidhodge931 avatar Sep 09 '22 06:09 davidhodge931