Skip to content

Commit 7d9bedb

Browse files
committed
fig(arch): widen Device box to 28u + fontsize 9.5 so label has margin
1 parent f90cf66 commit 7d9bedb

2 files changed

Lines changed: 10 additions & 11 deletions

File tree

docs/paper/figures/arch.png

112 Bytes
Loading

docs/paper/figures/make_figures.py

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

8282
def fig_architecture():
83-
fig, ax = plt.subplots(figsize=(8.2, 3.2))
83+
fig, ax = plt.subplots(figsize=(8.4, 3.2))
8484
# extra horizontal margin so FancyBbox rounded-corner padding (~3 units)
8585
# never bleeds past the canvas on either side.
86-
ax.set_xlim(-4, 152); ax.set_ylim(0, 52); ax.axis("off")
86+
ax.set_xlim(-4, 158); ax.set_ylim(0, 52); ax.axis("off")
8787

8888
def box(x, y, w, h, label, facecolor, edgecolor="black", text_color="black",
8989
fontsize=9, rounded=0.02):
@@ -118,9 +118,9 @@ def box(x, y, w, h, label, facecolor, edgecolor="black", text_color="black",
118118
box(x, y, inner_w, inner_h, label, C["bridge_inner"],
119119
edgecolor=C["bridge_outer"], fontsize=8.5)
120120

121-
# Device — short bare label (no parens). Pushed further right so the
122-
# "DCP wire" label on the incoming arrow has breathing room.
123-
box(122, 18, 22, 14, "Device\n< 16 KB MCU", C["device"], fontsize=10)
121+
# Device — short bare label, slightly tighter font so it never kisses
122+
# the rounded corners of the box.
123+
box(120, 18, 28, 14, "Device\n< 16 KB MCU", C["device"], fontsize=9.5)
124124

125125
# Arrows.
126126
def arrow(x1, y1, x2, y2, label, dy_label=2, color="black"):
@@ -132,15 +132,14 @@ def arrow(x1, y1, x2, y2, label, dy_label=2, color="black"):
132132

133133
arrow(22, 28, 34, 28, "MCP", dy_label=1)
134134
arrow(34, 22, 22, 22, "results", dy_label=-3.5, color="#666666")
135-
arrow(104, 28, 122, 28, "DCP wire", dy_label=1) # 18-unit gap (was 12)
136-
arrow(122, 22, 104, 22, "reply", dy_label=-3.5, color="#666666")
135+
arrow(104, 28, 120, 28, "DCP wire", dy_label=1) # 16-unit gap
136+
arrow(120, 22, 104, 22, "reply", dy_label=-3.5, color="#666666")
137137

138-
# Transport bullets centered under the Device box (x ≈ 133, w 22).
139-
# Shortened slightly so the line is roughly the Device's width.
140-
ax.text(133, 13, "UART · MQTT · BLE · USB-CDC",
138+
# Transport bullets centered under the Device box (x = 134, w 28).
139+
ax.text(134, 13, "UART · MQTT · BLE · USB-CDC",
141140
ha="center", va="center", fontsize=6.5,
142141
color="#555555", style="italic")
143-
ax.text(133, 8, "one wire format, any transport",
142+
ax.text(134, 8, "one wire format, any transport",
144143
ha="center", va="center", fontsize=6.5, color="#888888")
145144

146145
save(fig, "arch")

0 commit comments

Comments
 (0)