"""SCI Figure Hub — Publication UV-Vis DRS + Tauc Bandgap Dual Panel (CC0-1.0)""" import numpy as np import matplotlib.pyplot as plt PALETTE = ["#3C5488", "#00A087", "#E64B35"] 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, }) wl = np.linspace(250, 750, 400) hv = 1240.0 / wl eg_list = [("TiO2", 3.18), ("N-TiO2", 2.74), ("Heterojunction", 2.38)] fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(6.8, 2.55), dpi=300) for idx, (name, eg) in enumerate(eg_list): col = PALETTE[idx % len(PALETTE)] abs_val = 0.08 + 0.92 / (1.0 + np.exp((wl - (1240.0 / eg)) / 18.0)) tauc = np.maximum(0.0, (hv - eg) * 1.45)**1.15 * 2.2 ax1.plot(wl, abs_val, color=col, lw=1.5, label=name) ax2.plot(hv, tauc, color=col, lw=1.5, label=f"{name} ({eg:.2f} eV)") x_tan = np.linspace(eg, eg + 0.65, 20) ax2.plot(x_tan, (x_tan - eg) * 3.1, ls="--", lw=0.9, color=col, alpha=0.8) ax1.set_xlabel("Wavelength (nm)") ax1.set_ylabel("Absorbance (a.u.)") ax1.legend(frameon=False, fontsize=7) ax2.set_xlabel(r"Photon Energy h$\nu$ (eV)") ax2.set_ylabel(r"($\alpha$h$\nu$)$^{1/2}$ (eV$^{1/2}$)") ax2.set_xlim(1.8, 3.9) ax2.set_ylim(0, 3.2) ax2.legend(frameon=False, fontsize=6.8, loc="upper left") fig.tight_layout() fig.savefig("uvvis_tauc_bandgap.pdf", bbox_inches="tight")