SPB Git forge

spb/wp22_uqo

Public
6commits 1branches 0releases
142.4 MBsize
maindefault branch
1 h agolast push
TeX 55.1% Python 44.2%

WP22: Monte Carlo figure layout

Simon-Pierre Boucher committed 1 h ago (Oct 21, 2026) parent b9c90c2

8 changed files +3 −3

modified figures/fig_mc_coverage.pdf +0 −0

Binary file not shown.

modified figures/fig_mc_coverage.png +0 −0

Binary file not shown.

modified figures/fig_mc_rmse.pdf +0 −0

Binary file not shown.

modified figures/fig_mc_rmse.png +0 −0

Binary file not shown.

modified paper/figures/fig_mc_coverage.pdf +0 −0

Binary file not shown.

modified paper/figures/fig_mc_rmse.pdf +0 −0

Binary file not shown.

modified paper/main.pdf +0 −0

Binary file not shown.

modified scripts/60_figures.py +3 −3
@@ -215,15 +215,15 @@ def fig_mc():
215 215 s = sub.filter(pl.col("method") == m); vals = {r["scenario"]: (r["rmse_ret"], r["rmse_ret_mcse"]) for r in s.iter_rows(named=True)}
216 216 ys = [100 * vals[sc][0] if sc in vals and vals[sc][0] is not None else np.nan for sc in scen]; es = [100 * vals[sc][1] if sc in vals and vals[sc][1] is not None else 0 for sc in scen]
217 217 ax.bar(np.arange(len(scen)) + j * w - 0.4 + w / 2, ys, width=w * 0.92, color=cols[m], label=labels[m], yerr=es, error_kw=dict(lw=0.5, capsize=0), lw=0)
218 − ax.set_yscale("log"); ax.set_ylabel(f"RMSE of monthly log change (%, log scale)\n{lvl} level"); ax.grid(True, which="both", axis="y", lw=0.4)
218 + ax.set_yscale("log"); ax.set_ylabel(f"RMSE, {lvl} (%)"); ax.grid(True, which="both", axis="y", lw=0.4)
219 219 axes[1].set_xticks(range(len(scen))); axes[1].set_xticklabels([s.replace("_", " ") for s in scen], rotation=20, fontsize=7.5)
220 − axes[0].legend(ncol=4, fontsize=6.5, loc="upper left")
220 + h, l = axes[0].get_legend_handles_labels(); fig.legend(h, l, ncol=4, fontsize=7, loc="lower center", bbox_to_anchor=(0.5, -0.06), frameon=False)
221 221 save(fig, "fig_mc_rmse")
222 222 fig, ax = plt.subplots(figsize=(9.2, 2.9))
223 223 for m in ["S_sharp", "S_sharp_filtered", "S_noEB", "S_LLT", "S_norobust", "S_coarseloc", "K_qhpi", "C_pooled_td"]:
224 224 s = d.filter((pl.col("level") == "municipality") & (pl.col("method") == m)); vals = {r["scenario"]: r["cov95"] for r in s.iter_rows(named=True)}
225 225 ax.plot(range(len(scen)), [100 * vals.get(sc, np.nan) if vals.get(sc) is not None else np.nan for sc in scen], marker="o", ms=4, color=cols[m], label=labels[m])
226 − ax.axhline(95, color=INK2, lw=0.6, ls="--"); ax.set_ylabel("Coverage of 95 % intervals (%)\nmunicipality level"); ax.set_xticks(range(len(scen))); ax.set_xticklabels([s.replace("_", " ") for s in scen], rotation=20, fontsize=7.5); ax.legend(ncol=4, fontsize=6.5)
226 + ax.axhline(95, color=INK2, lw=0.6, ls="--"); ax.set_ylabel("95 % interval coverage (%)"); ax.set_xticks(range(len(scen))); ax.set_xticklabels([s.replace("_", " ") for s in scen], rotation=20, fontsize=7.5); ax.legend(ncol=4, fontsize=6.5)
227 227 save(fig, "fig_mc_coverage")
228 228
229 229
230 230