Skip to content

Commit 6cd4f9e

Browse files
thomasahleclaude
andcommitted
book_layout: wider per-character spacing so multi-char labels don't collide
Labels like 'logits'/'target'/'exp' were modeled ~15% too narrow (CHAR_W=0.11), so adjacent multi-character nodes overlapped into an illegible run-on ('logitstargetpow') and the short connecting wires shrank to dots. Bumped CHAR_W to 0.14, matching the rendered roman width, so those labels now sit apart with a visible wire between them. Single-character labels (A, x, v) are unchanged. 38 tests. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018PzG3QbNtaFmABBHBG39wp
1 parent 867ab43 commit 6cd4f9e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎tensorgrad/extras/book_layout.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
# ---------------------------------------------------------------------------
9292

9393
PITCH = 0.62 # horizontal distance between adjacent spine node centers
94-
CHAR_W = 0.11 # extra pitch per label character beyond the first
94+
CHAR_W = 0.14 # extra pitch per label character beyond the first
9595
STUB = 0.32 # length of a free-edge stub
9696
PENDANT_DY = 0.55 # vertical drop of a hanging branch level
9797
MIDSTUB = 0.4 # length of an interior free-edge stub (drawn upward)

0 commit comments

Comments
 (0)