# SCI Figure Hub — UpSet Multi-Set Intersection Plot (CC0-1.0) library(ggplot2) pal <- c("#3C5488", "#E64B35", "#00A087", "#4DBBD5") df <- data.frame( combo = factor(c("All 4", "RNA+Prot", "RNA+ATAC", "Prot+ATAC+ChIP", "RNA+Prot+ATAC", "ATAC+ChIP"), levels = c("All 4", "RNA+Prot", "RNA+ATAC", "Prot+ATAC+ChIP", "RNA+Prot+ATAC", "ATAC+ChIP")), size = c(148, 116, 94, 78, 64, 52), highlight = c("Core", "Pair", "Pair", "Tri", "Tri", "Pair") ) p <- ggplot(df, aes(combo, size, fill = highlight)) + geom_col(width = 0.58, colour = "#121C26", linewidth = 0.25) + geom_text(aes(label = size), vjust = -0.45, size = 2.6, fontface = "bold") + scale_fill_manual(values = pal) + labs(x = "Set Intersection", y = "Intersection Size") + theme_classic(base_size = 8) + theme(axis.text.x = element_text(angle = 25, hjust = 1), legend.position = "none") ggsave("upset_intersection.pdf", p, width = 115, height = 74, units = "mm")