Skill Tracer
Skills › Scientific Agent Skills › latex-posters › ai_graphics_for_posters.md

ai_graphics_for_posters.md

117 lines · skills/latex-posters/references/ai_graphics_for_posters.md at 5f2bc03

Open on GitHub

Most marks come from matching words in the file, so treat them as pointers.

1# AI Graphics for Posters
2
3AI generation is optional and appropriate for conceptual illustrations. Scientific
4results come from analysis code and original observations. Use the scientific-schematics
5skill for detailed diagram authoring when available, or the helpers shipped here.
6

AI Graphics for Posters

AI generation is optional and appropriate for conceptual illustrations. Scientific results come from analysis code and original observations. Use the scientific-schematics skill for detailed diagram authoring when available, or the helpers shipped here.

Raw lines 1 to 6
7## Choose the correct visual source
8
9| Visual | Recommended source | Required checks |
10| --- | --- | --- |
11| Numerical plot, statistical summary | Analysis code and verified data | Values, units, scales, uncertainty, sample size, provenance |
12| Microscopy, spectra, instrument data | Original research output | Faithful processing, scale bars, provenance |
13| Exact pathway, workflow, architecture | TikZ/vector editor or reviewed AI draft | Nodes, edges, labels, omitted steps, scientific meaning |
14| Conceptual illustration | Optional AI image generation | Accuracy, misleading implications, rights, visual clarity |
15| Title, metric callout, citation, QR code | LaTeX, plotting code, `qrcode` | Exact text/value/URL and final-size legibility |
16| Institution/company logo | Official asset | Correct identity, permission, print resolution |
18Do not choose or suppress comparison methods solely to fit a graphic. Simplify the
19presentation while preserving information needed to interpret the finding. Axes,
20units, legends, baselines, denominators, and uncertainty must remain where needed.

Choose the correct visual source

VisualRecommended sourceRequired checks
Numerical plot, statistical summaryAnalysis code and verified dataValues, units, scales, uncertainty, sample size, provenance
Microscopy, spectra, instrument dataOriginal research outputFaithful processing, scale bars, provenance
Exact pathway, workflow, architectureTikZ/vector editor or reviewed AI draftNodes, edges, labels, omitted steps, scientific meaning
Conceptual illustrationOptional AI image generationAccuracy, misleading implications, rights, visual clarity
Title, metric callout, citation, QR codeLaTeX, plotting code, qrcodeExact text/value/URL and final-size legibility
Institution/company logoOfficial assetCorrect identity, permission, print resolution

Do not choose or suppress comparison methods solely to fit a graphic. Simplify the presentation while preserving information needed to interpret the finding. Axes, units, legends, baselines, denominators, and uncertainty must remain where needed.

Raw lines 7 to 21
22## Before generation
241. State the single idea and intended final printed width/height.
252. Identify the essential components and labels. Three or four large components is
26 often a useful starting point, not a scientific constraint.
273. Split crowded diagrams without removing necessary qualifications or making a
28 hypothesis look like an established result.
294. Use exact short labels, strong contrast, ample spacing, and simple shapes. Put
30 longer explanations into editable LaTeX captions.
315. Ensure the prompt contains only information appropriate to send to the service.

Before generation

  1. State the single idea and intended final printed width/height.
  2. Identify the essential components and labels. Three or four large components is often a useful starting point, not a scientific constraint.
  3. Split crowded diagrams without removing necessary qualifications or making a hypothesis look like an established result.
  4. Use exact short labels, strong contrast, ample spacing, and simple shapes. Put longer explanations into editable LaTeX captions.
  5. Ensure the prompt contains only information appropriate to send to the service.
Raw lines 22 to 32
33## Helper contract (reviewed 2026-09-30)
35`generate_schematic.py` delegates to `generate_schematic_ai.py`. Requirements are
36Python 3.10+, `requests`, network access, and `OPENROUTER_API_KEY`. The scripts resolve
37the key from the environment or a project `.env`; prefer those over command-line keys.
39- Generation: `POST https://openrouter.ai/api/v1/images`, Bearer authentication,
40 JSON `model`, `prompt`, `n: 1`; non-streaming response `data[0].b64_json` and optional
41 `media_type`. The helper verifies PNG signature and requires a `.png` output path.
42- Model: `google/gemini-3.1-flash-image` (Nano Banana 2). Current endpoint records
43 allow one image per call; `output_format` is absent from those provider capability
44 maps, so the helper relies on the provider default and validates the bytes.
45- Review: `POST https://openrouter.ai/api/v1/chat/completions`, the same auth, model
46 `google/gemini-3.7-flash`, a user message with text and an `image_url` PNG data URL.
47 Review text is read from `choices[0].message.content`.
48- `--doc-type poster` selects the helper's 7/10 review heuristic. It is not an
49 externally validated quality standard. Maximum `--iterations` is 1 or 2; a failed
50 refinement keeps the preceding saved draft. No automatic paid-request retries.
51- The helper writes the PNG, versioned drafts, and `*_review_log.json`. Review failure,
52 score below threshold, or generation failure is recorded. Check `quality_met`,
53 `final_reviewed`, and `termination_reason` rather than treating exit 0 as approval.
55The official API contracts and public model/provider catalogues were checked; no
56paid calls through the bundled schematic helpers were executed for this refresh.
57There is no pagination in these two inference calls. Model discovery is a separate
58read operation, not a prerequisite automatically performed by the helper.

Helper contract (reviewed 2026-09-30)

generate_schematic.py delegates to generate_schematic_ai.py. Requirements are Python 3.10+, requests, network access, and OPENROUTER_API_KEY. The scripts resolve the key from the environment or a project .env; prefer those over command-line keys.

  • Generation: POST https://openrouter.ai/api/v1/images, Bearer authentication, JSON model, prompt, n: 1; non-streaming response data[0].b64_json and optional media_type. The helper verifies PNG signature and requires a .png output path.
  • Model: google/gemini-3.1-flash-image (Nano Banana 2). Current endpoint records allow one image per call; output_format is absent from those provider capability maps, so the helper relies on the provider default and validates the bytes.
  • Review: POST https://openrouter.ai/api/v1/chat/completions, the same auth, model google/gemini-3.7-flash, a user message with text and an image_url PNG data URL. Review text is read from choices[0].message.content.
  • --doc-type poster selects the helper's 7/10 review heuristic. It is not an externally validated quality standard. Maximum --iterations is 1 or 2; a failed refinement keeps the preceding saved draft. No automatic paid-request retries.
  • The helper writes the PNG, versioned drafts, and *_review_log.json. Review failure, score below threshold, or generation failure is recorded. Check quality_met, final_reviewed, and termination_reason rather than treating exit 0 as approval.

The official API contracts and public model/provider catalogues were checked; no paid calls through the bundled schematic helpers were executed for this refresh. There is no pagination in these two inference calls. Model discovery is a separate read operation, not a prerequisite automatically performed by the helper.

Raw lines 33 to 59
60## Illustrative call
62Run from the skill root, using an output path in the poster project. This costs API
63credits and was not executed in the refresh:
65```bash
66python scripts/generate_schematic.py \
67 "Conceptual A0 poster workflow. Three large boxes: SAMPLE, MEASURE, ANALYZE. Clear left-to-right arrows, generous white space, dark readable labels. No numerical data, extra claims, or figure caption." \
68 -o /path/to/project/figures/methods.png --doc-type poster --iterations 1
69```
71A request for “80 pt” or “300 DPI” is a visual cue, not a guaranteed physical font
72size or resolution. The helper does not expose a resolution option. Determine
73actual pixels and placed width before deciding whether the image is suitable.
74For example, a 2048-pixel-wide image placed at 12 inches has about 171 PPI regardless
75of the file's nominal DPI metadata. Prefer vector artwork or regenerate at a suitable
76resolution with a capable tool when the available raster image is insufficient.

Illustrative call

Run from the skill root, using an output path in the poster project. This costs API credits and was not executed in the refresh:

python scripts/generate_schematic.py \
  "Conceptual A0 poster workflow. Three large boxes: SAMPLE, MEASURE, ANALYZE. Clear left-to-right arrows, generous white space, dark readable labels. No numerical data, extra claims, or figure caption." \
  -o /path/to/project/figures/methods.png --doc-type poster --iterations 1

A request for “80 pt” or “300 DPI” is a visual cue, not a guaranteed physical font size or resolution. The helper does not expose a resolution option. Determine actual pixels and placed width before deciding whether the image is suitable. For example, a 2048-pixel-wide image placed at 12 inches has about 171 PPI regardless of the file's nominal DPI metadata. Prefer vector artwork or regenerate at a suitable resolution with a capable tool when the available raster image is insufficient.

Raw lines 60 to 77
Runs code python scripts/generate_schematic.py :66
78## Review before assembly
80Open the generated image and verify each node, arrow, label, symbol, and implication
81against the intended scientific content. An automated vision review can miss errors.
82Check spelling, contrast, visibility of labels, and space around the edges. If changes
83are necessary, correct editable vector elements or regenerate and inspect again.
85After inclusion, inspect a rendered poster at its intended size and viewing distance.
86“25% zoom” on an arbitrary display is not a calibrated physical-size test. For a
8725% printed proof, viewing from 1 foot approximates a full-size viewing distance
88of 4 feet. Check an actual-size crop for image sharpness and QR scanning.

Review before assembly

Open the generated image and verify each node, arrow, label, symbol, and implication against the intended scientific content. An automated vision review can miss errors. Check spelling, contrast, visibility of labels, and space around the edges. If changes are necessary, correct editable vector elements or regenerate and inspect again.

After inclusion, inspect a rendered poster at its intended size and viewing distance. “25% zoom” on an arbitrary display is not a calibrated physical-size test. For a 25% printed proof, viewing from 1 foot approximates a full-size viewing distance of 4 feet. Check an actual-size crop for image sharpness and QR scanning.

Raw lines 78 to 89
90## Assembly
92These are illustrative fragments inside the appropriate poster class:
94```latex
95% tikzposter: a precise caption remains editable
96\block{Methods}{
97 \begin{tikzfigure}[Conceptual overview; see the text for study details.]
98 \includegraphics[width=0.85\linewidth]{figures/methods.png}
99 \end{tikzfigure}
102% baposter: the named box is positioned relative to an existing intro box
103\headerbox{Methods}{name=methods,column=0,below=intro}{
104 \centering
105 \includegraphics[width=0.85\linewidth]{figures/methods.png}
107```
109Do not delete the scripts/data needed to regenerate quantitative figures. Preserve
110image-generation prompt/model metadata with the project if AI artwork is included.

Assembly

These are illustrative fragments inside the appropriate poster class:

% tikzposter: a precise caption remains editable
\block{Methods}{
  \begin{tikzfigure}[Conceptual overview; see the text for study details.]
    \includegraphics[width=0.85\linewidth]{figures/methods.png}
  \end{tikzfigure}
}

% baposter: the named box is positioned relative to an existing intro box
\headerbox{Methods}{name=methods,column=0,below=intro}{
  \centering
  \includegraphics[width=0.85\linewidth]{figures/methods.png}
}

Do not delete the scripts/data needed to regenerate quantitative figures. Preserve image-generation prompt/model metadata with the project if AI artwork is included.

Raw lines 90 to 111
Runs code scripts/data :109
112## Official sources
114- [OpenRouter image generation](https://openrouter.ai/docs/guides/overview/multimodal/image-generation)
115- [OpenRouter image inputs for vision review](https://openrouter.ai/docs/guides/overview/multimodal/image-understanding)
116- [Current image-provider capabilities](https://openrouter.ai/api/v1/images/models/google/gemini-3.1-flash-image/endpoints)
117- [General model catalogue](https://openrouter.ai/api/v1/models)