ggblanket
Purpose
ggblanket is a package of wrapper functions around the fantastic ggplot2 package.
The primary objective is to simplify ggplot2 visualisation.
Secondary objectives relate to:
- Scope: cover the most useful 80% of what ggplot2 does
- Design: produce well-designed visualisation by default
- Alignment: use conventions generally aligned with ggplot2.
It is intended to be useful for all levels of experience from beginner to expert.
Installation
install.packages("ggblanket")
Examples
library(ggblanket)
library(palmerpenguins)
library(dplyr)
penguins |>
tidyr::drop_na() |>
mutate(sex = stringr::str_to_sentence(sex)) |>
gg_point(
x = flipper_length_mm,
y = body_mass_g,
col = sex,
title = "Penguins body mass by flipper length",
subtitle = "Palmer Archipelago, Antarctica",
caption = "Source: Gorman, 2020"
)
penguins |>
tidyr::drop_na() |>
mutate(sex = stringr::str_to_sentence(sex)) |>
gg_point(
x = flipper_length_mm,
y = body_mass_g,
col = sex,
facet = species,
title = "Penguins body mass by flipper length",
subtitle = "Palmer Archipelago, Antarctica",
caption = "Source: Gorman, 2020",
theme = dark_mode()
)
penguins |>
tidyr::drop_na(sex) |>
mutate(sex = stringr::str_to_sentence(sex)) |>
gg_histogram(
x = flipper_length_mm,
col = sex,
facet = species,
pal = c("#2596be", "#fc7c24"))
Get started
Click here to get started learning how ggblanket works.
Thanks!
Thank you to all authors and contributors to ggplot2, tidyverse, and the wider R ecosystem. If you like ggblanket, please give the repository a star and help spread the word.