"""SCI Figure Hub — BET N2 Isotherm with Pore Size Distribution Inset (CC0-1.0)""" PALETTE = ["#00A087", "#3C5488"] import numpy as np import matplotlib.pyplot as plt COL = PALETTE[0] plt.rcParams.update({"font.sans-serif": ["Arial", "DejaVu Sans"], "font.size": 8, "pdf.fonttype": 42}) p = np.linspace(0.01, 0.99, 45) ads = 180 * (1 - np.exp(-p * 28)) + 160 / (1 + np.exp(-(p - 0.68) / 0.055)) + 90 * p**8 des = 180 * (1 - np.exp(-p * 28)) + 160 / (1 + np.exp(-(p - 0.54) / 0.05)) + 90 * p**8 fig, ax = plt.subplots(figsize=(3.5, 2.75), dpi=300) ax.plot(p, ads, "-o", color=COL, ms=3.2, lw=1.2, label="Adsorption") ax.plot(p, des, "-o", color=COL, ms=3.2, lw=1.2, mfc="#FFFFFF", label="Desorption") ax.text(0.05, 0.72, "S_BET = 842 m² g⁻¹\nV_total = 0.68 cm³ g⁻¹", transform=ax.transAxes, fontsize=7) ax.set_xlabel("Relative Pressure (P/P₀)") ax.set_ylabel("Quantity Adsorbed (cm³ g⁻¹ STP)") ax.legend(frameon=False, loc="upper left", fontsize=7) ax_in = ax.inset_axes([0.52, 0.16, 0.43, 0.42]) d = np.linspace(1, 25, 120) dv = 0.42 * np.exp(-((d - 3.8) / 0.9) ** 2) + 0.12 * np.exp(-((d - 11.5) / 2.6) ** 2) ax_in.plot(d, dv, color=PALETTE[1], lw=1.1) ax_in.fill_between(d, 0, dv, color=PALETTE[1], alpha=0.18) ax_in.set_xlabel("Pore Width (nm)", fontsize=6.5) ax_in.set_ylabel("dV/dD", fontsize=6.5) ax_in.tick_params(labelsize=6) fig.tight_layout() fig.savefig("bet_isotherm.pdf", bbox_inches="tight")