Skip to content

Commit 684e6b4

Browse files
committed
fig(arch): more horizontal room + drop parens + bigger Device box
1 parent 7340726 commit 684e6b4

2 files changed

Lines changed: 20 additions & 18 deletions

File tree

docs/paper/figures/arch.png

1.39 KB
Loading

docs/paper/figures/make_figures.py

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,10 @@ def save(fig, name: str) -> None:
8080
# Figure 1 — Architecture.
8181

8282
def fig_architecture():
83-
fig, ax = plt.subplots(figsize=(7.5, 3.2))
84-
ax.set_xlim(0, 130); ax.set_ylim(0, 52); ax.axis("off")
83+
fig, ax = plt.subplots(figsize=(8.0, 3.2))
84+
# extra horizontal margin so FancyBbox rounded-corner padding (~3 units)
85+
# never bleeds past the canvas on either side.
86+
ax.set_xlim(-4, 144); ax.set_ylim(0, 52); ax.axis("off")
8587

8688
def box(x, y, w, h, label, facecolor, edgecolor="black", text_color="black",
8789
fontsize=9, rounded=0.02):
@@ -96,28 +98,28 @@ def box(x, y, w, h, label, facecolor, edgecolor="black", text_color="black",
9698
fontsize=fontsize, color=text_color)
9799

98100
# LLM
99-
box(2, 18, 18, 14, "LLM\n(MCP host)", C["llm"], fontsize=10)
101+
box(2, 18, 20, 14, "LLM\nMCP host", C["llm"], fontsize=10)
100102

101103
# Bridge outer — widened to comfortably hold 2x2 inner grid
102-
box(32, 4, 60, 44, "", "#ffffff", edgecolor=C["bridge_outer"], rounded=1.5)
103-
ax.text(32 + 30, 42, "Bridge sole trust boundary",
104-
ha="center", va="bottom", fontsize=9.5, color=C["bridge_outer"],
104+
box(34, 4, 70, 44, "", "#ffffff", edgecolor=C["bridge_outer"], rounded=1.5)
105+
ax.text(34 + 35, 42, "Bridge sole trust boundary",
106+
ha="center", va="bottom", fontsize=10, color=C["bridge_outer"],
105107
fontweight="bold")
106108

107-
# Bridge inner components (2 x 2 grid) — single-line labels, wider cells
108-
inner_w, inner_h = 26, 11
109+
# Bridge inner components (2 x 2 grid) — single-line short labels, comfy cells
110+
inner_w, inner_h = 30, 11
109111
cells = [
110-
(35, 24, "Capability token"),
111-
(63, 24, "Range / type"),
112-
(35, 10, "Dry-run"),
113-
(63, 10, "Audit / rate-limit"),
112+
(37, 24, "Capability token"),
113+
(69, 24, "Range / type check"),
114+
(37, 10, "Dry-run preview"),
115+
(69, 10, "Audit / rate-limit"),
114116
]
115117
for x, y, label in cells:
116118
box(x, y, inner_w, inner_h, label, C["bridge_inner"],
117119
edgecolor=C["bridge_outer"], fontsize=8.5)
118120

119-
# Device
120-
box(104, 18, 24, 14, "Device\n(<16 KB MCU)", C["device"], fontsize=10)
121+
# Device — bigger box, short bare label (no parens)
122+
box(116, 18, 22, 14, "Device\n< 16 KB MCU", C["device"], fontsize=10)
121123

122124
# Arrows.
123125
def arrow(x1, y1, x2, y2, label, dy_label=2, color="black"):
@@ -127,10 +129,10 @@ def arrow(x1, y1, x2, y2, label, dy_label=2, color="black"):
127129
ax.text((x1 + x2) / 2, max(y1, y2) + dy_label, label,
128130
ha="center", va="bottom", fontsize=8, color=color, style="italic")
129131

130-
arrow(20, 28, 32, 28, "MCP", dy_label=1)
131-
arrow(32, 22, 20, 22, "results", dy_label=-3.5, color="#666666")
132-
arrow(92, 28, 104, 28, "DCP wire", dy_label=1)
133-
arrow(104, 22, 92, 22, "reply", dy_label=-3.5, color="#666666")
132+
arrow(22, 28, 34, 28, "MCP", dy_label=1)
133+
arrow(34, 22, 22, 22, "results", dy_label=-3.5, color="#666666")
134+
arrow(104, 28, 116, 28, "DCP wire", dy_label=1)
135+
arrow(116, 22, 104, 22, "reply", dy_label=-3.5, color="#666666")
134136

135137
# Transport bullets under device
136138
transports = "UART · MQTT · BLE · USB-CDC"

0 commit comments

Comments
 (0)