plots: dejargon, drop redundant titles, emit png+svg+pdf, CSV re-render

Audit of all 4 plot scripts (plot_dynamics/substrate/emergence/deploy_overlay):
- One save_fig(fig, path) helper in figs.py writes png+svg+pdf (vector for the
  paper, png for the blog). All scripts call it.
- arm_label() map: reader-facing names only -- route2->route, drop 'knob'/'the
  cheat' from titles and the train-vs-deploy story (adapter on/off, reward hack).
- Titles off by default (the paper/blog caption carries it); --title re-enables
  for standalone research use.
- dump_data CSV now carries every plotted series; plot_dynamics --from-csv
  re-renders the three figures from the committed CSV with no logs (logs/ and
  out/runs/ are gitignored; out/figs/*.csv is tracked). Round-trip verified.
- Commit the regenerated dyn_sub4 figures in all 3 formats + the CSV.

Co-Authored-By: Claudypoo <288921227+claudypoo@users.noreply.github.com>
This commit is contained in:
wassname
2026-06-03 02:44:39 +00:00
parent 17a8792340
commit 87cca9a603
15 changed files with 8854 additions and 62 deletions
+4 -4
View File
@@ -39,6 +39,8 @@ import matplotlib.pyplot as plt
import numpy as np
from loguru import logger
from projected_grpo.figs import save_fig
# hk_ column header -> (display mode, colour). Order = panel/legend order.
# Colourblind-safe-ish qualitative set; one hue per loophole, reused across panels.
HK = {
@@ -172,9 +174,8 @@ def plot_by_method(runs, ylabel, cumulative, span, out: Path):
fontsize=6.5, va="top", color="#888")
axes[0].set_ylabel(ylabel)
axes[0].set_ylim(-0.02, None)
out.parent.mkdir(parents=True, exist_ok=True)
fig.tight_layout()
fig.savefig(out, dpi=140, bbox_inches="tight")
save_fig(fig, out)
logger.info(f"wrote {out} (by-method, {len(methods)} methods)")
@@ -205,9 +206,8 @@ def plot_by_hack(runs, ylabel, cumulative, span, out: Path):
_despine(ax)
axes[0].set_ylabel(ylabel)
axes[0].set_ylim(-0.02, None)
out.parent.mkdir(parents=True, exist_ok=True)
fig.tight_layout()
fig.savefig(out, dpi=140, bbox_inches="tight")
save_fig(fig, out)
logger.info(f"wrote {out} (by-hack, {len(modes)} modes)")