"""SCI Figure Hub — Publication Raman / FTIR Stacked Spectra with Peak Callouts (CC0-1.0)""" import numpy as np import matplotlib.pyplot as plt PALETTE = ["#E64B35", "#00A087", "#3C5488", "#4DBBD5"] plt.rcParams.update({ "font.family": "sans-serif", "font.sans-serif": ["Arial", "Helvetica", "DejaVu Sans"], "font.size": 8, "axes.linewidth": 0.8, "axes.spines.top": False, "axes.spines.right": False, "pdf.fonttype": 42, }) def lorentz(x, x0, gamma, amp): return amp * (gamma**2) / ((x - x0)**2 + gamma**2) wn = np.linspace(800, 2200, 900) samples = [ ("Pristine Carbon", 0.0, 0.72, 1.00, 0.25), ("N-Doped 600 C", 1.25, 0.96, 1.00, 0.35), ("SA-Fe/NC (Ours)", 2.50, 1.18, 1.00, 0.42), ] fig, ax = plt.subplots(figsize=(3.5, 2.75), dpi=300) for idx, (label, off, d_amp, g_amp, w_d) in enumerate(samples): y = off + lorentz(wn, 1350, 48 + idx * 5, d_amp) + lorentz(wn, 1585, 36, g_amp) + lorentz(wn, 1618, 22, w_d) col = PALETTE[idx % len(PALETTE)] ax.plot(wn, y, color=col, lw=1.35) ax.text(2175, off + 0.22, f"{label} (ID/IG={d_amp/g_amp:.2f})", ha="right", fontsize=6.8, fontweight="bold", color=col) for px, name in [(1350, "D band\n1350"), (1585, "G band\n1585")]: ax.axvline(px, color="#64748B", ls="--", lw=0.75, alpha=0.7) ax.text(px, 3.85, name, ha="center", va="bottom", fontsize=6.8, color="#121C26") ax.set_xlabel("Raman Shift (cm$^{-1}$)") ax.set_ylabel("Intensity (a.u.)") ax.set_yticks([]) ax.set_xlim(800, 2200) ax.set_ylim(-0.1, 4.35) fig.tight_layout() fig.savefig("raman_ftir_spectra.pdf", bbox_inches="tight")