# SCI Figure Hub — GO / KEGG Pathway Enrichment Bubble Plot (CC0-1.0) pal <- c("#F0F921", "#CC4778", "#0D0887") library(ggplot2) df <- data.frame( pathway = factor(c("PI3K-Akt signaling", "MAPK cascade", "Cytokine interaction", "Oxidative stress", "Cell cycle", "Autophagy", "Apoptosis", "DNA repair"), levels = c("PI3K-Akt signaling", "MAPK cascade", "Cytokine interaction", "Oxidative stress", "Cell cycle", "Autophagy", "Apoptosis", "DNA repair")), rich = c(0.14, 0.17, 0.21, 0.24, 0.28, 0.31, 0.35, 0.41), count = c(12, 18, 22, 26, 19, 31, 28, 38), nlfdr = c(2.1, 2.8, 3.4, 4.1, 4.9, 5.5, 6.2, 7.4) ) p <- ggplot(df, aes(x = rich, y = pathway, size = count, fill = nlfdr)) + geom_point(shape = 21, colour = "#1E293B", stroke = 0.35) + scale_fill_gradientn(colours = pal, name = expression(-log[10](FDR))) + scale_size_area(max_size = 6, name = "Count") + labs(x = "Rich Factor", y = NULL) + theme_bw(base_size = 8) + theme(panel.grid.minor = element_blank()) ggsave("enrichment_bubble.pdf", p, width = 102, height = 70, units = "mm")