Fig. 1A: pastel palette (green biology, two blues for AI) + Mendel peas and robot icons

Per GG: the biological model goes pastel green (nature), the two AI tiers
light and darker pastel blue; header text switches from white to the dark
shade of each hue (white is unreadable on pastel). A green-pea icon honours
Mendel in the biology header; a friendly robot marks the two AI headers.
Icons are Flaticon #2347052 and #10479785, used under GG's paid Flaticon
licence (noted in make_figs.py); header text is centred slightly left of a
dedicated icon slot so nothing collides. Caption colour sentence updated
(green vs blues).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BkRLcc18rwT2Lysu6PbG7v
This commit is contained in:
Giorgio Gilestro 2026-09-07 13:23:35 +01:00
parent 2d8f661924
commit 9055fca792
7 changed files with 26 additions and 15 deletions

View file

@ -46,13 +46,17 @@ def save(fig, name):
def fig1a():
from matplotlib.patches import FancyBboxPatch
# (name, architecture, guarantee, edge, cell face, header fill, header text colour, icon)
# Icons: Flaticon #2347052 (green pea, for Mendel) and #10479785 (robot), used under GG's
# paid Flaticon licence.
TIERS = [
("Biological model", "Wright\u2013Fisher simulator (NumPy)", "closed forms \u00b7 bitwise-reproducible",
"#3d7eb8", "#eaf2fa"),
"#4e8d4e", "#eef6ec", "#c5e0bd", "#2d5b2d", "icons/pea.png"),
("Trained networks", "RNN \u00b7 MLP \u00b7 VAE on a synthetic oracle;\nconvolutional VAE on MNIST",
"sign-level tests \u00b7 exact oracles", "#e97313", "#fdefe1"),
"sign-level tests \u00b7 exact oracles", "#5b9bc9", "#eff6fb", "#c9e2f2", "#1f4e79",
"icons/robot.png"),
("Language models", "LoRA specialists on Qwen 0.5B & 7B;\nexact-match verifier",
"seed-replicated signs", "#b04e0c", "#fbe6d4"),
"seed-replicated signs", "#3c6ea5", "#e7eef8", "#adc8e8", "#1d3f66", "icons/robot.png"),
]
ROWS = [
("Grounding = immigration",
@ -98,16 +102,22 @@ def fig1a():
xs = [x0, x0 + cw + sep, x0 + 2 * cw + sep]
row_h, row_top = 0.157, 0.805
for j2, (name, arch, guarantee, edge, face) in enumerate(TIERS):
from matplotlib.offsetbox import AnnotationBbox, OffsetImage
for j2, (name, arch, guarantee, edge, face, headfill, textcol, icon) in enumerate(TIERS):
x = xs[j2]
xc = x + cw / 2 - 0.02 # text centred left of the icon slot
ax.add_patch(FancyBboxPatch((x + gap, 0.825), cw - 2 * gap, 0.155,
boxstyle="round,pad=0.004", fc=edge, ec=edge, lw=1.4))
ax.text(x + cw / 2, 0.966, name, ha="center", va="top", fontsize=9.5,
fontweight="bold", color="white")
ax.text(x + cw / 2, 0.922, arch, ha="center", va="top", fontsize=6.8,
linespacing=1.3, color="white")
ax.text(x + cw / 2, 0.833, guarantee, ha="center", va="bottom", fontsize=6.4,
style="italic", color="white", alpha=0.92)
boxstyle="round,pad=0.004", fc=headfill, ec=edge, lw=1.6))
ax.text(xc, 0.966, name, ha="center", va="top", fontsize=9.5,
fontweight="bold", color=textcol)
ax.text(x + cw / 2 - 0.026, 0.922, arch, ha="center", va="top", fontsize=6.6,
linespacing=1.3, color=textcol)
ax.text(xc, 0.833, guarantee, ha="center", va="bottom", fontsize=6.4,
style="italic", color=textcol, alpha=0.85)
img = plt.imread(str(OUT / icon))
ax.add_artist(AnnotationBbox(OffsetImage(img, zoom=0.055),
(x + cw - gap - 0.024, 0.902), frameon=False))
for i2, (label, definition, cells) in enumerate(ROWS):
tags = TAGS[i2]
@ -119,7 +129,8 @@ def fig1a():
style="italic", color="#555", linespacing=1.35)
for j2, cell in enumerate(cells):
x = xs[j2]
edge, face = TIERS[j2][3], TIERS[j2][4]
edge = TIERS[j2][3]
face = TIERS[j2][4]
if cell is None:
ax.add_patch(FancyBboxPatch((x + gap, y0), cw - 2 * gap, y1 - y0,
boxstyle="round,pad=0.004", fc="white", ec="#bbbbbb",