
Volcano Plot
Scatter plot combining statistical significance (-log10 p-value) with effect magnitude (log2 fold-change) to identify differentially expressed genes or proteins.
Sample code / prompt
import matplotlib.pyplot as plt
import numpy as np
np.random.seed(42)
n_genes = 5000
log2fc = np.random.normal(0, 1.5, n_genes)
pvalues = 10 ** (-np.abs(log2fc) * np.random.uniform(0.5, 3, n_genes))
neg_log10p = -np.log10(pvalues)
fc_thresh = 1.0