Seasons Greetings by Riinu Pius
a place to collect nerdy holiday plots
── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ──
✔ ggplot2 3.4.0 ✔ purrr 0.3.4
✔ tibble 3.1.8 ✔ dplyr 1.0.10
✔ tidyr 1.2.0 ✔ stringr 1.5.0
✔ readr 2.1.3 ✔ forcats 0.5.1
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag() masks stats::lag()
# https://gist.github.com/riinuots/52c0089bd5c41a44389e95cc8cb3943d
one = tibble(x = c(2, 4, 3, 2.75, 2.75, 3.25, 3.25),
y = c(1, 1, 6, 0, 1, 1, 0),
group = c(rep("#005a32", 3), rep("#543005", 4)))
ggplot(one, aes(x, y, fill = group)) +
geom_polygon()
two = tribble(~x, ~y,
2.7, 2,
3, 3,
3.4, 1.6,
3.5, 2.5,
3.1, 4,
2.95, 5,
2.7, 3.7,
2.4, 2.45,
2.35, 1.7,
3.1, 2.1,
3.2, 3.1,
2.75, 3,
2.9, 1.4,
2.9, 4.4) %>%
mutate(group = "gold")
ggplot(one, aes(x, y, fill = group)) +
geom_polygon() +
geom_point(data = two, shape = 21, size = 5)