Last updated: 2024-03-25


# Load ggplot2
library(ggplot2)

# Load ggmitji 
library(ggmitji)

# Load patchwork (to put plots together)
library(patchwork)
areas <- shaded_3d_venn(highlight = "all", color = "white", line.col = "black") +
  annotate("text", label = "AnoBnoC", x = .2, y = .75, hjust = .5, vjust = .5) +
  annotate("text", label = "ABnoC", x = .5, y = .8, hjust = .5, vjust = .5) +
  annotate("text", label = "noABnoC", x = .8, y = .75, hjust = .5, vjust = .5) +
  annotate("text", label = "AnoBC", x = .3, y = .45, hjust = .5, vjust = .5) +
  annotate("text", label = "ABC", x = .5, y = .55, hjust = .5, vjust = .5) +
  annotate("text", label = "noABC", x = .7, y = .45, hjust = .5, vjust = .5) +
  annotate("text", label = "noAnoBC", x = .5, y = .25, hjust = .5, vjust = .5) +
  annotate("text", label = "Name of each area", x = .5, y = 1.06, hjust = .5, vjust = 0, fontface = "bold", size = 8) +
  coord_cartesian(ylim = c(0, 1.1))
areas

v1 <- shaded_3d_venn(highlight = "ABC", color = "red")
v2 <- shaded_3d_venn(highlight = c("AnoBnoC", "noABC"), c("yellow", "green"))
v3 <- shaded_3d_venn(highlight = "all", color = "black", line.col = "white")
(v1 + v2 + v3)