diff -ru /work/out/code_before/paper_figs_part1.py code/paper_figs_part1.py --- /work/out/code_before/paper_figs_part1.py 2026-11-02 10:35:46.928484583 +0000 +++ code/paper_figs_part1.py 2026-11-02 10:35:46.942277781 +0000 @@ -3,7 +3,7 @@ import numpy as np, json, os import matplotlib; matplotlib.use("Agg") import matplotlib.pyplot as plt -SEED = 20260907 +SEED = 20260907+20 os.makedirs("figs_paper", exist_ok=True) plt.rcParams.update({"font.size": 9, "axes.labelsize": 9, "axes.titlesize": 9.5, "legend.fontsize": 8, "xtick.labelsize": 8, "ytick.labelsize": 8}) diff -ru /work/out/code_before/paper_figs_part2.py code/paper_figs_part2.py --- /work/out/code_before/paper_figs_part2.py 2026-11-02 10:35:46.928527673 +0000 +++ code/paper_figs_part2.py 2026-11-02 10:35:46.942521225 +0000 @@ -5,7 +5,7 @@ from scipy.optimize import curve_fit import matplotlib; matplotlib.use("Agg") import matplotlib.pyplot as plt -SEED = 20260907 +SEED = 20260907+20 os.makedirs("figs_paper", exist_ok=True); os.makedirs("data", exist_ok=True) plt.rcParams.update({"font.size": 9, "axes.labelsize": 9, "axes.titlesize": 9.5, "legend.fontsize": 8, "xtick.labelsize": 8, "ytick.labelsize": 8}) @@ -230,7 +230,7 @@ fig, axes = plt.subplots(1, 2, figsize=(7.2, 2.9)) pstars = {} for name, s in scen13.items(): - W, _ = W_func(p_grid, **s) + W, _ = W_func(p_grid, *s) p_star = round(float(p_grid[np.argmax(W)]), 2) pstars[name] = p_star axes[0].plot(p_grid, W, lw=1.6, label=f"{name} ($p^*={p_star}$)") @@ -238,7 +238,7 @@ axes[0].set_xlabel("network connectivity p"); axes[0].set_ylabel("net fitness W(p)") axes[0].set_title("(a) optimal connectivity shifts down\nwith pathological load"); axes[0].legend(fontsize=7) for k, (w, a, form) in cargos.items(): - axes[1].plot(p_grid, w*f_form(form, p), lw=1.6, label=k) + axes[1].plot(p_grid, w*f_form(form, p_grid), lw=1.6, label=k) axes[1].axhline(0, color="k", lw=0.8) axes[1].set_xlabel("connectivity p"); axes[1].set_ylabel(r"weighted contribution $w_k \alpha_k f_k(p)$") axes[1].set_title("(b) four representative cargo classes"); axes[1].legend(fontsize=7) diff -ru /work/out/code_before/paper_figs_part2b.py code/paper_figs_part2b.py --- /work/out/code_before/paper_figs_part2b.py 2026-11-02 10:35:46.928576394 +0000 +++ code/paper_figs_part2b.py 2026-11-02 10:35:46.942689027 +0000 @@ -4,7 +4,7 @@ from scipy.spatial import cKDTree import matplotlib; matplotlib.use("Agg") import matplotlib.pyplot as plt -SEED = 20260907 +SEED = 20260907+20 N = 150 plt.rcParams.update({"font.size": 9, "axes.labelsize": 9, "axes.titlesize": 9.5, "legend.fontsize": 8, "xtick.labelsize": 8, "ytick.labelsize": 8}) @@ -81,7 +81,7 @@ up_path = continuation(up_seq, 900) down_path = continuation(up_seq[::-1], 901) up_p = np.array([x[3] for x in up_path]); dn_p = np.array([x[3] for x in down_path])[::-1] -hyst = float(np.trapezoid(dn_p - up_p, up_seq)) +hyst = float(np.trapz(dn_p - up_p, up_seq)) print("hysteresis area:", round(hyst, 4)) fig, axes = plt.subplots(1, 2, figsize=(7.2, 2.9)) diff -ru /work/out/code_before/paper_figs_part3.py code/paper_figs_part3.py --- /work/out/code_before/paper_figs_part3.py 2026-11-02 10:35:46.928618395 +0000 +++ code/paper_figs_part3.py 2026-11-02 10:35:46.942820369 +0000 @@ -5,7 +5,7 @@ from scipy.spatial import cKDTree import matplotlib; matplotlib.use("Agg") import matplotlib.pyplot as plt -SEED = 20260910 +SEED = 20260910+20 plt.rcParams.update({"font.size": 9, "axes.labelsize": 9, "axes.titlesize": 9.5, "legend.fontsize": 8}) BLUE, RED, GREEN, ORANGE = "#1f77b4", "#d62728", "#2ca02c", "#ff7f0e" os.makedirs("figs_paper", exist_ok=True) diff -ru /work/out/code_before/paper_figs_part4.py code/paper_figs_part4.py --- /work/out/code_before/paper_figs_part4.py 2026-11-02 10:35:46.928660335 +0000 +++ code/paper_figs_part4.py 2026-11-02 10:35:46.942932670 +0000 @@ -5,7 +5,7 @@ import scipy.sparse as sp, scipy.sparse.csgraph as csg import matplotlib; matplotlib.use("Agg") import matplotlib.pyplot as plt -SEED = 20260911 +SEED = 20260911+20 plt.rcParams.update({"font.size": 9, "axes.labelsize": 9, "axes.titlesize": 9.5, "legend.fontsize": 8}) BLUE, RED, GREEN, ORANGE = "#1f77b4", "#d62728", "#2ca02c", "#ff7f0e" os.makedirs("figs_paper", exist_ok=True) @@ -92,7 +92,7 @@ ups.append(u); dns.append(d[::-1]) up_m, dn_m = np.mean(ups, axis=0), np.mean(dns, axis=0) xs = np.linspace(0.5, 8.0, 12) - area = float(np.trapezoid(dn_m - up_m, xs)) + area = float(np.trapz(dn_m - up_m, xs)) areas[eps] = round(area, 3); traj[eps] = (xs, up_m, dn_m) print(f"eps={eps}: hysteresis area = {area:.3f}") json.dump({"areas": areas}, open("data/paper_memory.json", "w"), indent=1) diff -ru /work/out/code_before/paper_figs_part5.py code/paper_figs_part5.py --- /work/out/code_before/paper_figs_part5.py 2026-11-02 10:35:46.928700776 +0000 +++ code/paper_figs_part5.py 2026-11-02 10:35:46.943064282 +0000 @@ -5,7 +5,7 @@ import scipy.sparse as sp, scipy.sparse.csgraph as csg import matplotlib; matplotlib.use("Agg") import matplotlib.pyplot as plt -SEED = 20260912 +SEED = 20260912+20 trap = getattr(np, 'trapezoid', np.trapz) plt.rcParams.update({"font.size": 9, "axes.labelsize": 9, "axes.titlesize": 9.5, "legend.fontsize": 8}) BLUE, RED, GREEN, ORANGE, PURPLE = "#1f77b4", "#d62728", "#2ca02c", "#ff7f0e", "#6a1b9a"