Skip to content

Instantly share code, notes, and snippets.

@riinuots
Created December 24, 2022 06:21
Show Gist options
  • Save riinuots/f7911684e8e6f6b1a0388652ad182c79 to your computer and use it in GitHub Desktop.
Save riinuots/f7911684e8e6f6b1a0388652ad182c79 to your computer and use it in GitHub Desktop.
library(tidyverse)
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)))
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) +
scale_fill_identity()
@abbashakam
Copy link

thanks alot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment