davidhodge931 / ggblanket

Simplify ggplot2 visualisation
https://davidhodge931.github.io/ggblanket/
Other
156 stars 8 forks source link

New themes #675

Closed davidhodge931 closed 8 months ago

davidhodge931 commented 8 months ago

image

davidhodge931 commented 8 months ago

image

davidhodge931 commented 8 months ago

image

davidhodge931 commented 8 months ago

library(tidyverse)
library(ggblanket)
library(palmerpenguins)
library(patchwork)

penguins |>
  drop_na() |> 
  mutate(across(sex, \(x) str_to_sentence(x))) |> 
  gg_histogram(
    x = flipper_length_mm,
    col = species,
    title = "Penguin flipper length by species",
    subtitle = "Palmer Archipelago, Antarctica",
    caption = "Source: Gorman, 2020", 
    col_title = "",
    theme = grey_mode_t(),
  ) 

penguins |>
  drop_na() |> 
  mutate(across(sex, \(x) str_to_sentence(x))) |> 
  gg_histogram(
    x = flipper_length_mm,
    col = species,
    title = "Penguin flipper length by species",
    subtitle = "Palmer Archipelago, Antarctica",
    caption = "Source: Gorman, 2020", 
    col_title = "",
    theme = light_mode_t(),
  ) 

penguins |>
  drop_na() |> 
  mutate(across(sex, \(x) str_to_sentence(x))) |> 
  gg_histogram(
    x = flipper_length_mm,
    col = species,
    title = "Penguin flipper length by species",
    subtitle = "Palmer Archipelago, Antarctica",
    caption = "Source: Gorman, 2020", 
    col_title = "",
    theme = dark_mode_t(),
  )