@@ -80,10 +80,10 @@ def save(fig, name: str) -> None:
8080# Figure 1 — Architecture.
8181
8282def fig_architecture ():
83- fig , ax = plt .subplots (figsize = (8.0 , 3.2 ))
83+ fig , ax = plt .subplots (figsize = (8.2 , 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 , 144 ); ax .set_ylim (0 , 52 ); ax .axis ("off" )
86+ ax .set_xlim (- 4 , 152 ); 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,8 +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 — bigger box, short bare label (no parens)
122- box (116 , 18 , 22 , 14 , "Device\n < 16 KB MCU" , C ["device" ], fontsize = 10 )
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 )
123124
124125 # Arrows.
125126 def arrow (x1 , y1 , x2 , y2 , label , dy_label = 2 , color = "black" ):
@@ -131,15 +132,16 @@ def arrow(x1, y1, x2, y2, label, dy_label=2, color="black"):
131132
132133 arrow (22 , 28 , 34 , 28 , "MCP" , dy_label = 1 )
133134 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" )
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" )
136137
137- # Transport bullets centered under the Device box (x ≈ 127, w 22).
138- ax .text (127 , 13 , "UART · MQTT · BLE · USB-CDC" ,
139- ha = "center" , va = "center" , fontsize = 7 ,
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" ,
141+ ha = "center" , va = "center" , fontsize = 6.5 ,
140142 color = "#555555" , style = "italic" )
141- ax .text (127 , 8 , "( one wire format, any transport) " ,
142- ha = "center" , va = "center" , fontsize = 7 , color = "#888888" )
143+ ax .text (133 , 8 , "one wire format, any transport" ,
144+ ha = "center" , va = "center" , fontsize = 6.5 , color = "#888888" )
143145
144146 save (fig , "arch" )
145147
0 commit comments