# SCI Figure Hub — Differential Expression Volcano Plot (CC0-1.0) pal <- c("#E64B35", "#3C5488", "#CBD5E1") library(ggplot2) set.seed(31) n <- 600 lfc <- rnorm(n, 0, 1.4) nlp <- abs(lfc) * runif(n, 0.4, 2.2) + runif(n, 0, 1.2) state <- ifelse(lfc >= 1 & nlp >= 1.301, "Up", ifelse(lfc <= -1 & nlp >= 1.301, "Down", "NS")) df <- data.frame(lfc = lfc, nlp = nlp, state = factor(state, levels = c("Down", "NS", "Up"))) p <- ggplot(df, aes(x = lfc, y = nlp, colour = state)) + geom_point(size = 1.2, alpha = 0.8) + geom_vline(xintercept = c(-1, 1), linetype = "dashed", linewidth = 0.35, colour = "#64748B") + geom_hline(yintercept = 1.301, linetype = "dashed", linewidth = 0.35, colour = "#64748B") + scale_colour_manual(values = c(Down = pal[2], NS = pal[3], Up = pal[1]), name = NULL) + labs(x = expression(log[2]("Fold Change")), y = expression(-log[10](italic(P)[adj]))) + theme_classic(base_size = 8) + theme(legend.position = "top") ggsave("volcano_plot.pdf", p, width = 89, height = 70, units = "mm")