v2 phase 3: 4 figures via figures:scientific-figure composer#60
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
v2 Phase 3: build 4 publication-ready figures by actually invoking the figure-pipeline skills. Closes #11.
Skill invocations (in order)
/figures:scientific-figurecompose.py(svgutils-based composer at exact mm coords),validate_fonts.py,export.py/figures:svg-figurepanels/:fig1_matrix.svg(4-perspective x 15-theme matrix),fig2_plot.svg(naturalness gradient plot),fig3_gap_matrix.svg(8 x 4 gap table),fig4_predictions.svg(4 perspectives x 5 columns)/figures:transparent-iconstheme.jsonfor consistency/figures:figure-qa(agents)check_svg.py+ visual Read; reports underqa/compose.py configs/figN.json -o figN.svgfor each. Single panel each, scale = 174/493 = 0.3529 to map pt-viewBox to mm-canvasvalidate_fonts.py figN.svg --journal cellreturns 0 issues across all 4 figures (25 + 30 + 85 + 71 = 211 text elements; all >= 6pt)Pipeline lesson (the demo observation)
The skill's example uses mm-viewBox with the claim "
<text font-size=9>is 9 pt", but in practice rsvg-convert treats unit-less font-size in an mm-viewBox SVG as user units (= mm). Workaround applied: use pt-viewBox (1 unit = 1 pt) with width/height in mm; the validator's pt-unit assumption then matches the renderer.A second pipeline lesson: rsvg-convert silently drops external image references (CVE-2023-38633 mitigation), even with absolute file:// URIs. Workaround applied: inline all icons as base64 data URIs in the panel SVGs. Adds ~130 KB per figure but renders portably across rsvg/cairosvg/Inkscape.
Programmatic QA results
After in-phase fixes (off-palette
#e7f0faand#fef0e7lightened tints in Fig 3 swapped to Okabe-Ito hex withfill-opacity="0.10"):QA reports saved at
manuscript/narrative-review/figures/qa/figN_qa.md.Output
figures/fig1-4.svg(final composed SVGs, 174mm wide; Figs 1 and 3 are 130mm tall, Figs 2 and 4 are 100mm tall)figures/fig1-4.png(300 dpi PNG exports)figures/panels/figN_*.svg(panel sources)figures/icons/*.png(10 transparent icons, 256x256)figures/configs/figN.json(composer configs)figures/qa/figN_qa.md(QA reports)Test plan