Academic Figures & Experimental Plots (Top-Conference Strict 2-Hue Harmony, Prose-to-Figure, Mechanism-Rich, Anti-Box-itis & Unified-Theme Standard — v12)
Design and export editable .drawio XML architecture & mechanism diagrams AND zero-contrast-shock Matplotlib experimental evaluation plots as 100% pure-vector LaTeX PDFs (0 raster /Image XObjects) that look genuinely indistinguishable from published OSDI, SOSP, NSDI, FAST, SIGMOD, VLDB, ICDE, ISCA, ASPLOS, EuroSys, SIGCOMM, NeurIPS, and MLSys papers (DistServe, Sarathi-Serve, AlpaServe, SGLang, Mooncake, Splitwise, ServerlessLLM, MegaScale, LoongServe, CacheGen, Alpa, SkyPilot, Orca, SpotServe, vAttention, ClickHouse, FastLanes, LeCo, TiDB, PolarDB-IMCI, CacheLib, Kangaroo, Tectonic, Pond, Midas, Caladan, Demikernel, Firecracker, PDX, Starling, HiState, PolarKV, RetroInfer, Fangorn, Photon, Flink 2.0).
Backed by:
- 30-Paper Empirical Prose-to-Figure Playbook (
419total figs,213design figs,202prose-matched,118visually audited across10top venues — references/prose-to-figure-playbook.md), - v12 Strict 2-Hue Single-Diagram Discipline + 13-Gate Automated Auditor (
hue_clutter_warningenforces<= 2perceptual hue sectors per Draw.io figure;get_figure_palette("steel_coral" | "teal_amber" | "blue_amber" | "blue_teal" | "indigo_amber" | "mono_blue" | "mono_teal")prevents red+yellow+blue+green rainbow clashes structurally!), - v11/v12 Native Mechanism & Anti-Box-itis Toolkit (
58DrawioBuilder.add_*methods — scripts/drawio_toolkit.py, worked showcases examples/ex3_multimodal_platform_arch.png, examples/ex4_protocol_and_memory_map.png, examples/ex5_timeline_and_code_dag.png), - 6-Theme Whole-Paper Color Engine (Strict
<= 2-Hue Draw.io Presets + 12-Family Multi-Series Matplotlib Library — scripts/palette_themes.py, examples/theme_gallery.png), - 111 Themeable Dual-Scale Morandi Duotone SVG Icons Across 9 Categories (scripts/icon_library.py, references/icon-catalog.md, examples/icon_gallery.png),
- 21-Paper Empirical Proportion & Text-Budget Laws (
n = 577boxes,18arch figs,61eval plots), a 13-Gate Automated Draw.io Auditor (includinghue_clutter_warning,box_monotony_warning&code_snippet_overload_warning), a Cross-Figure Color Harmony Auditor, and a Unified Experimental Plot Toolkit (scripts/exp_plot_toolkit.py).
Core Philosophy: The 10 Top-Conference Figure Laws (v12)
Before drawing anything, inspect prose-to-figure-playbook.md, color-themes.md, examples/theme_gallery.png, design-laws-and-palette.md, exp-plot-standards.md, icon-catalog.md, and examples/ (especially ex3, ex4, and ex5). Always enforce these 10 laws:
- Choose the Visual Archetype From Your Prose FIRST & Synchronize Bidirectionally (v11!):
- Never blindly default to a box-and-arrow overview! Across
30landmark systems papers,> 60%of the most cited design figures are Mechanism Figures — not static architecture boxes. - Match the citing paragraph's explanatory verb to the 10-Archetype Decision Matrix (
U1–U10) in references/prose-to-figure-playbook.md:U1Layered/Disaggregated Overview (24/30) →add_split_stage,add_stacked_container,add_icon_tile,add_block_arrow,add_bridge_banner,add_curly_brace(direction="right")U2Baseline-vs-Ours Contrast (18/30) →add_contrast_pair+add_status_badge(check/cross/warn/halt/prune)U3Physical Byte/Page Layout & Pointer Mapping (15/30) →add_slot_rail,add_mapping_links, upgradedadd_memory_strip(pointers=, top_pins=, tag_colors=, wavy_end=),add_zoom_callout,add_phase_stripU4Execution Gantt / Discrete-Time State Swimlane (14/30) →add_timeline_lanes+add_span_bracket+ verticaladd_curly_braceU5Annotated Empirical Diagnostic (§1–§3,12/30) →exp_plot_toolkit.py(regime bands, delta arrows, callouts)U6Parallelism / SIMD / Per-Hop Hardware Datapath (11/30) →add_dimension_bar,add_matrix_grid,add_zoom_callout,add_cubeU7Dynamic Tree / Radix Trie / Operator DAG / FSM (11/30) →add_tree_dag(two-tonesplitsharded nodes +new/hit/evictedstates),add_state_machineU8Multi-Party RPC / Migration / 2PC Sequence (9/30, +twin R/W) →add_sequence_diagram+add_ring_buffer+add_legendU9Annotated Code / SQL / DSL-to-Plan (9/30) →add_code_snippet(<= 10lines, highlighted lines + right leader annotations) +add_tree_dagU10Macro-to-Micro Zoom-In Projection Lens (8/30) →add_zoom_callout(style="trapezoid"|"dashed_rays")
- Enforce the 5 Text–Figure Bidirectional Synchronization Laws: (i) 1-to-1
❶–❺step badges,(§N)roadmap tags &(I)–(III)phase strips echoed verbatim in prose; (ii) 1 concrete worked running example (A_d/C_p1,V0→P2,LSN 299) instead of abstractReq_i; (iii) explicit control-vs-data wire coding +add_legend; (iv) dual-mode Overview (4–22words) or 3-part Mechanism caption (Scope + Visual Key + Takeaway); (v) neutral baselines vs. focal novelty tinting +✓/✗verdicts.
- Never blindly default to a box-and-arrow overview! Across
- One Figure = One Core Concept (Split Overloaded Mega-Figures!):
- Never cram 4–6 unrelated mechanisms into one giant overcrowded canvas.
- Keep each diagram focused on 1 primary message (typically
6–14primary actors;<= 18for compact multi-stage platforms likeex3;<= 2–3tightly coupled panels). Split overloaded mega-figures into crisp single-column (~400–440 px) or compact spanning (~820–860 px) figures placed beside the exact paragraphs that explain them.
- Logical Subfigure Grids & Bottom-Aligned Subcaptions (
(a),(b)ALWAYS Below!):- Arrange multi-panel figures on clean, symmetrical grids:
1×2(ex4,ex5),1×3,2×1(add_contrast_pair(orientation="vertical")), or2×2. - Subfigure titles
(a) ...,(b) ...,(c) ...MUST sit centered BELOW each subfigure (add_subcaption(...)), matching ACM / PVLDB / USENIX / IEEE conventions. Never put(a)/(b)/(c)captions at the top of panels!
- Arrange multi-panel figures on clean, symmetrical grids:
- Strict
<= 2-Hue Single-Diagram Discipline + Whole-Paper Theme Lock (v12 — NEVER Mix Red+Yellow+Blue+Green!):- Lock ONE curated theme across the entire paper via
set_paper_theme("<name>")(or envACADEMIC_FIG_THEME=<name>) from scripts/palette_themes.py — choosing among 6 curated academic themes:morandi_sigmod(Default),nordic_slate,editorial_nature,botanical_earth,mineral_vermeer, andokabe_calm(examples/theme_gallery.png, references/color-themes.md). - CRITICAL SEPARATION (v12): The 12 families per theme exist for multi-series Matplotlib evaluation plots (
get_series_cycle(n)). A single Draw.io diagram MUST NEVER mix>= 3chromatic hue sectors (e.g., never paint red + yellow + blue + green in one figure!). Instead, callFP = get_figure_palette("steel_coral")(or"teal_amber","blue_amber","blue_teal","indigo_amber","mono_blue","mono_teal"):- 75–85% Neutral Canvas: white, warm stone (
stone_lt), soft slate (slate_lt/slate_bg), charcoal ink (ink), and neutral rules (rule_dk/stroke). Keep hardware rail titles and(a)/(b)subcaptions strictly neutral charcoal (ink)! - 1 Primary Hue Tonal Ladder (
pri_lt→pri_mid→pri_ln→pri_dk): differentiate hot/main/compute/Ours stages via lightness within ONE hue instead of inventing a new color per tier. - At Most 1 Restrained Accent Hue (
acc_*/alt_*): reserve strictly for contrast/bottleneck/eviction/cold/focal innovation (e.g.,coral/redsharing the single warmred_coralsector).
- 75–85% Neutral Canvas: white, warm stone (
- Enforced automatically by Gate #13
hue_clutter_warning(distinct_hue_sectors > 2→ FAIL) alongsidevivid_color_warning. Ban vivid web/Tailwind neon colors, giant dark monolith boxes, andshadow=1.
- Lock ONE curated theme across the entire paper via
- Break Box Monotony ("Anti-Box-itis") — Pictorial Tiles & Native Draw.io Idioms:
- NEVER wrap every actor, modality, storage backend, or queue in uniform rectangular boxes or tiny
18–20 pxicon-welladd_icon_cardgrids! Capadd_icon_card <= 50%of actors and keepbox_like_ratio <= 0.72(enforced bybox_monotony_warning). - Combine borderless
add_icon_tile(...)inside headerlessadd_split_stage(...), 3-tier connectors (add_block_arrow, solidadd_edge, curved dashed feedbackadd_edge(..., curved=True)), 3-layeradd_stacked_container(...)+add_ellipsis(...), tokenizedadd_slot_queue(...)+add_callout_label(...), straddlingadd_bridge_banner(...), nativeadd_cloud/add_multi_doc/add_chevron_flow/add_cylinder/add_cube, AND the 15 new v11 mechanism primitives (ex3,ex4,ex5).
- NEVER wrap every actor, modality, storage backend, or queue in uniform rectangular boxes or tiny
- Authentic Enclosing Structures, Domain Data Visuals & Controlled Nesting (NO Forced Polygon Circus!):
- Combine
1–2levels of clean controlled nesting (add_split_stage,add_stacked_container,add_contrast_pair,add_titled_groupfor explicit swimlanes/contrasts,add_dashed_group,add_zone,add_hardware_rail, 4-directionadd_curly_brace) with concrete data visuals (add_struct_table,add_memory_strip,add_slot_rail,add_matrix_grid,add_tree_dag,add_state_machine,add_ring_buffer,add_code_snippet,add_operator_node,add_pill,add_accent_callout,add_status_badge). Keep decorative polygons<= 2per figure.
- Combine
- Rich, Dual-Scale Morandi Duotone Iconography (
111Icons Across9Categories — v11!):- Draw from
111handcrafted 32×32 pure-vector high-silhouette Morandi duotone icons in scripts/icon_library.py (full directory in references/icon-catalog.md, specimen sheet in examples/icon_gallery.png), spanning 9 categories:- Multimodal Media (
9):audio_note,audio_wave,video_cam,video_film,image_frame,pdf_doc,table_grid,table_analytics,text_corpus - Cloud & Container Infra (
14, +4 v11):container_cube,k8s_pod,cloud_upload,catalog_list,db_search,worker_pool,shared_mem,gpu_card,mps_slices,object_bucket,microvm_sandbox,raft_consensus,spot_preempt,multi_cloud - Dataflow & Queues (
9, +1 v11):slot_queue,ring_buffer,dataframe,scheduler_dag,batch_stack,backpressure,prefetch_pipe,shard_balance,thread_pool - Hardware & Compute (
14, +4 v11):gpu,gpu_cluster,cpu,cpu_ram,ram,tensor_core,server_node,cluster_nodes,network_nic,pcie_bus,nvlink_fabric,cxl_switch,simd_lanes,os_kernel - Storage & Indexes (
19, +7 v11):database,nvme,nvme_coral,ssd_card,cloud_store,table_col,btree_index,hnsw_graph,buffer_pool,wal_log,compress_zip,cache_sram,lsm_tree,bloom_filter,hash_table,page_table,key_value,disk_hdd,checkpoint_snap - AI & LLM Runtime (
13, +2 v11):transformer,attention_head,kv_cache,lora_adapter,moe_router,vector_embed,llm_prompt,ssm_state,quant_bits,ai_sparkle,model_weights,token_seq,radix_tree - Clients & Streams (
7):user,users_multi,query_sql,terminal,stream_events,queue_fifo,file - Operators & Control (
14, +3 v11):switch,funnel,merge_join,scissors,gear,scheduler,compiler_ir,bolt,recycle,udf_code,shuffle_mesh,live_migrate,fsm_automaton,evict_trash - Verify & Metrics (
12, +1 v11):shield,check_cert,lock,epoch_fence,target,magnifier,gauge_perf,alert,clock,chart_mini,telemetry_pulse,profiler_trace
- Multimodal Media (
- Bold
1.6–1.9 pxcontours + Morandi duotone fills read crisply at BOTH28–44 pxborderless tiles AND16–22 pxinline card/lifeline/header slots, synced across all6 themes × 12 accents(7,992SVGs verified). Never substitute wrong metaphors!
- Draw from
- Empirically Calibrated Container-to-Text Proportions & True Printed Legibility:
- Calibrated on 21 SIGMOD/VLDB papers (
n = 577leaf boxes): printed median6.01 pt(66%–78%of 9pt body) with snug vertical fill67%–86%. - Always compute
printed_pt = font_px × (slot_pt / canvas_W)(recommend_typography(canvas_w, slot)&fit_box_height(...)): prefer compact spanning canvases820–860 px(title 10.8–11.5 px,body 9.6–10.4 px,subcaption 11.0 px) so compiled PDF text ALWAYS prints at5.6–7.0 pt(enforced bytiny_font_warning,bloated_container_warning,cramped_container_warning).
- Calibrated on 21 SIGMOD/VLDB papers (
- Strict Architecture Text Budget, Code Budget & Focal Hierarchy ("Structure in Figure, Numbers in Eval, Proofs in Text!"):
- Calibrated on 18 SIGMOD/VLDB arch figures (
n = 186boxes): median3.0 words/box(1–2lines) and71 words/fig(ex4 = 36,ex3 = 50,ex5 = 75),< 2%bullet lists or micro-timings. - KEEP: Component role +
(§N), 1 core mechanism/symbol, 1 concrete worked example (A_d,V0→P2,SELECT ...). - CUT: ❌ Bullet lists (
•), ❌ eval benchmark timings/speedups (11.9μs,−55.4%), ❌ bloated code blocks (> 10lines), ❌ multi-sentence prose callouts! Enforced automatically byverbose_box_warning,bullet_list_warning,text_overload_warning, andcode_snippet_overload_warning.
- Calibrated on 18 SIGMOD/VLDB arch figures (
- Whole-Paper Unified Plot Palette, 4-Channel Emphasis, Cross-Figure Harmony Audit & 0-Raster Provenance:
- Use exp_plot_toolkit.py + palette_themes.py + exp-plot-standards.md so Matplotlib plots share the exact same active theme and 6-stop tonal ramps (
EXP_PALETTE, 12-hueget_series_cycle(n)), 4-channel emphasis (Hue/Sat + heavy solidlw=2.0+ borderless delta callouts + 1:1 physical inches7.0 inwithframeon=Falsetop legends), and locked method-color registry. - Run
audit_paper_color_harmony(pdf_paths, theme_name)across ALL figure PDFs to verifycontrast_shock_warning == False,0neon outliers, andfitz_images == 0AND raw/Subtype /Image == 0, with every number verbatim to verified CSV/JSON.
- Use exp_plot_toolkit.py + palette_themes.py + exp-plot-standards.md so Matplotlib plots share the exact same active theme and 6-stop tonal ramps (
Standard 7-Step Workflow (v11)
Step 0 — Prose-to-Figure Archetype Selection (NEW in v11 — ALWAYS DO FIRST!)
- Read the exact citing paragraph(s) of the manuscript and consult references/prose-to-figure-playbook.md.
- Classify the paragraph's explanatory intent into
U1–U10(Overview, Contrast, Memory/Page Map, Gantt/State Timeline, Empirical Diagnostic, Hardware Datapath/Latency, Tree/DAG/FSM, RPC Sequence/Twin Path, Code-to-Plan, or Zoom Lens). - Lock the 5 Bidirectional Sync elements before drawing: (a) step badges (
❶–❺) or(§N)tags matching prose, (b) 1 concrete running example, (c) control-vs-data visual key (add_legend), (d) Mode A or 3-part Mode B caption draft, and (e) neutral baseline vs. highlighted novelty tier.
Step 1 — Reference, Showcases & Icon Selection
- Inspect examples/ex3_multimodal_platform_arch.png (macro platform), examples/ex4_protocol_and_memory_map.png (RPC sequence + memory/zoom/latency), examples/ex5_timeline_and_code_dag.png (contrast Gantt + SQL-to-DAG + FSM), examples/icon_gallery.png (
111icons across9categories), and examples/theme_gallery.png (or runpython3 ~/.gemini/config/skills/academic-drawio-figures/scripts/drawio_toolkit.py --list-icons). - Optionally fetch benchmark figures on new venues via
fetch_ref_papers.py --out /tmp/ref_papers --preset sigmod-vldb.
Step 2 — Scope Split, Subfigure Grid & Semantic-Role → v11-Primitive Plan
Before writing coordinates:
- Decide whether to split: Keep
<= 14logical actors per figure (<= 18for compact multi-stage platforms); split overloaded mega-figures into focused single-column or symmetric multi-panel diagrams. - Pick a symmetric layout (
1×2,1×3,2×1,2×2, or left-to-right stage architecture) and reserve22–26 pxat the bottom of each subfigure foradd_subcaption(...). - Map every semantic role to its exact v11 primitive & calibrated font scale (
recommend_typography(canvas_w, slot)+fit_box_height(...)):- Protocol / RPC / Live-Migration / 2PC (
U8) →add_sequence_diagram(...),add_span_bracket(...),add_ring_buffer(...),add_legend(...) - Baseline-vs-Ours Contrast & Verdicts (
U2) →add_contrast_pair(...),add_status_badge(kind="check"|"cross"|"warn"|"halt"|"prune") - Execution Gantt / Discrete-Time State Swimlane (
U4) →add_timeline_lanes(discrete_grid=False|True),add_span_bracket(...),add_curly_brace(direction="right"|"left") - Virtual→Physical Slot Mapping, Wire Bitfields & Zoom (
U3/U10) →add_slot_rail(...)+add_mapping_links(...),add_zoom_callout(style="trapezoid"|"dashed_rays"), upgradedadd_memory_strip(pointers=, top_pins=, tag_colors=, wavy_end=),add_dimension_bar(...),add_phase_strip(...) - Annotated SQL/DSL Code, Trees, Sharded DAGs & FSMs (
U7/U9) →add_code_snippet(...)(<= 10lines),add_tree_dag(...)(supportssplittwo-tone nodes &new/hit/evictedstates),add_state_machine(...) - Macro Overview & Anti-Box-itis Idioms (
U1) →add_split_stage(...),add_icon_tile(...),add_actor_node(...),add_block_arrow(...),add_edge(..., curved=True, dashed=True, edge_label=...),add_stacked_container(...),add_ellipsis(...),add_slot_queue(...)+add_callout_label(...),add_bridge_banner(...),add_cloud,add_multi_doc,add_chevron_flow,add_hardware_rail,add_titled_group(swimlanes/contrasts only),add_icon_card(cap<= 50%of actors),add_struct_table,add_matrix_grid,add_cylinder,add_cube,add_accent_callout
- Protocol / RPC / Live-Migration / 2PC (
Step 3 — Author Parametric Generator with drawio_toolkit.py
Write a clean Python generator importing drawio_toolkit.py:
- Produces uncompressed native
<mxfile>XML (.drawio) editable in Draw.io Desktop, VS Code, and diagrams.net (including v11 nativesplitRect/doubleCircle/zoomWedge/codeSnippet,mxgraph.arrows2.arrow,curved=1edges,shape=cloud,mxgraph.flowchart.multi-document). - Runs automated geometry + v12 13-gate academic quality auditing (
validate_drawio+audit_academic_quality:0OOB,0unintended overlaps,0edge-crossing-shape hits [including Bezier sampling & ancestor-safe nested slot routing], plus all 13 warning gates== False:vivid_color_warning,hue_clutter_warning[<= 2hue sectors],subcaption_position_warning,polygon_overuse_warning,complexity_warning,tiny_font_warning,bloated_container_warning,cramped_container_warning,verbose_box_warning,bullet_list_warning,text_overload_warning,box_monotony_warning, andcode_snippet_overload_warning). - Renders 2× Retina PNG previews (
preview_<name>.png) first without overwriting existing manuscript.pdffigures.
Step 4 — Mandatory Visual Gate (Inspect PNGs Before PDF Export!)
Open every preview_<name>.png with read_file and verify:
- Archetype Accuracy & Prose Sync (v11): Does the visual structure genuinely match the citing prose (
U1–U10), with 1-to-1 step/section anchors, a concrete worked example, clear control-vs-data coding, and readable<= 10-line code snippets? - Anti-Box-itis & Visual Rhythm: Does it pass
box_monotony_warning == Falseandcode_snippet_overload_warning == Falsewith varied semantic shapes? - Dual-Scale Icon Richness & Metaphor Accuracy: Exact
111-icon domain pictograms at28–44 pxborderless tiles or16–22 pxinline module/lifeline/header slots, theme-harmonized viaset_paper_theme(...). - Subfigure Layout & Bottom Captions: Symmetric panels with
(a) ...,(b) ...centered below each panel. - Zero Defects & Verbatim Provenance: Zero clipping, overlaps, or crossing wires; every metric/symbol matches
.texand CSV/JSON verbatim.
Step 5 — Export Tightly Cropped 100% Pure-Vector PDFs
python3 ~/.gemini/config/skills/academic-drawio-figures/scripts/drawio_toolkit.py \
--validate-and-export path/to/figure.drawio \
--png path/to/preview_figure.png \
--pdf path/to/figure.pdf
Hard pass criteria (enforced automatically): pages == 1, tight MediaBox, fitz_images == 0 AND raw /Subtype /Image == 0, and clean 13-gate academic_quality audit (hue_clutter_warning == False).
Step 6 — LaTeX Integration & Compiled Page Verification
Embed single-column figures at 0.96–1.00\columnwidth and two-column spanning figures at 0.90–0.96\textwidth, recompile (pdflatex/tectonic/latexmk), verify exact page budget and 0 errors, and visually inspect the rendered 150-DPI PDF pages via read_file.
Playbook, Prompt Templates, Catalogs & Reusable Assets (v11)
- 30-Paper Empirical Prose-to-Figure Playbook (
U1–U10Decision Matrix + 5 Bidirectional Sync Laws + 8 Worked Recipes): references/prose-to-figure-playbook.md - 6-Theme × 12-Family whole-paper color catalog & exact 6-stop hex tables: references/color-themes.md
- Visual galleries & 5 worked v11 showcases: examples/theme_gallery.png, examples/icon_gallery.png, examples/ex1_llm_serving_arch.png, examples/ex2_query_format_pipeline.png, examples/ex3_multimodal_platform_arch.png, examples/ex4_protocol_and_memory_map.png, examples/ex5_timeline_and_code_dag.png
- 111-icon Morandi duotone catalog (9 categories) & small-inline vs. borderless-pictorial guide: references/icon-catalog.md
- Empirically calibrated design laws, v11 mechanism + Anti-Box-itis tables, proportions, text budgets & 12-gate auditor guide: references/design-laws-and-palette.md
- Experimental result plot standards & 4-channel emphasis guide: references/exp-plot-standards.md
- Archetype-first copy-paste prompts (Chinese & English — Prose-to-Figure + Anti-Box-itis + theme-locked plots +
/swarmrubric): references/prompt-templates.md - Single-source-of-truth 6-theme × 12-family color engine & cross-figure harmony auditor: scripts/palette_themes.py
- 111-icon dual-scale themeable pure-vector SVG engine (9 categories × 12 accents × 6 themes): scripts/icon_library.py
- Pure-vector Draw.io builder (
58add_*methods incl. 15 new + 2 upgraded v11 mechanism primitives), 12-gate auditor & 0-raster PDF exporter: scripts/drawio_toolkit.py - Unified Matplotlib experimental plot toolkit (
EXP_PALETTE,SERIES_CYCLE, 0-raster auditor): scripts/exp_plot_toolkit.py - Gallery & showcase generators (
ex1–ex5): scripts/build_theme_gallery.py, scripts/build_examples.py - Reference SIGMOD/VLDB paper downloader & figure page renderer: scripts/fetch_ref_papers.py