Skip to content

Instantly share code, notes, and snippets.

@francisvolh
francisvolh / penguins_rainclouds.R
Last active October 29, 2024 19:41 — forked from z3tt/penguins_rainclouds.R
Polished raincloud plot using the Palmer penguins data
url <- "https://raw.githubusercontent.com/allisonhorst/palmerpenguins/master/man/figures/lter_penguins.png"
img <- magick::image_read((url))
pic <- grid::rasterGrob(img, interpolate = TRUE)
pal <- c("#FF8C00", "#A034F0", "#159090")
add_sample <- function(x) {
return(c(y = max(x) + .025,
label = length(x)))