Creates and audits truthful, accessible, publication-ready scientific figures with Matplotlib, Seaborn or Plotly, covering figure design, multi-panel layouts, uncertainty and missing-data displays, colour and contrast review, image metadata validation and journal export planning. Load alongside figures when a plot must meet a specific journal's requirements or needs an accessibility or export audit. Not for diagrams (use schematics) or illustrations (use generate-image).
Build figures that preserve scientific meaning before optimizing appearance. Separate universal principles from dated publisher rules, preserve raw data and transformations, use color redundantly, and inspect delivered files rather than trusting plotting defaults.
Non-negotiable guardrails
Never alter, hide, invent, or selectively enhance data to improve a figure.
Preserve raw tables/images, exclusions, missing-value codes, analysis code, normalization, binning, image adjustments, and random seeds.
Do not infer journal requirements. Identify the exact journal, article type, figure type, and submission phase; verify its live official guidance.
Do not claim that a palette, DPI value, format, or automated report makes a figure accessible or journal-compliant.
Do not silently connect missing observations, suppress inconvenient points, upsample images as if detail increased, or tune axes/dual axes to exaggerate a conclusion.
Keep interactive and static outputs as distinct deliverables. Interactive hover is not a substitute for labels, alt text, keyboard access, an accessible data table, or a static fallback.
Read references/publication_guidelines.md for deceptive-encoding and integrity checks. Read references/journal_requirements.md only after the target and phase are known.
Workflow
1. Define the evidence and destination
Record:
audience and medium: manuscript, web, slide, poster, supplement;
exact publisher/journal, article type, submission phase, and intended final width;
source-data paths/identifiers and output provenance.
If requirements are not known, create a provisional general figure and label all publisher choices as pending verification.
2. Choose an honest encoding
Prefer position on a common scale. Before coding, check:
Bars/areas: normally include zero because length/area is measured from a baseline.
Points/lines: nonzero limits can be valid; show context and disclose breaks.
Uncertainty: name SD, SE, CI, percentile, posterior, or another interval; state n and the unit of replication.
Raw observations: show them when feasible; do not let jitter obscure categories/values.
Missing data: distinguish missing, zero, censored, and excluded; use gaps or explicit model/interpolation styling.
Area/volume: scale area/volume, not radius/diameter; avoid decorative 3D.
Log axes: label the base/transform and declare how zero/negative values are handled.
Binning/smoothing: record edges, bandwidth/window, method, and sensitivity.
Normalization: state formula/reference and keep limits consistent across compared panels.
Dual axes: prefer aligned panels; if unavoidable, justify units and do not engineer apparent correlation.
Images: preserve originals, disclose whole-image adjustments, show scale bars, and avoid clipped/erased background.
3. Design accessibility in, not after
Use color plus marker, line style, hatching, direct label, or panel separation.
Choose qualitative, sequential, diverging, or cyclic color according to data semantics.
Audit foreground/background contrast at the rendered size.
Make missing and out-of-range values explicit.
Provide alt text, a longer description for complex figures, and underlying data for web delivery.
Treat WCAG 2.2 as web guidance: 4.5:1 normal text, 3:1 large text, and 3:1 for graphical objects required for understanding; color cannot be the only cue. Applicability and exceptions matter.
See references/color_palettes.md. A grayscale screen is useful but is not a complete color-vision or accessibility test.
4. Implement with scoped styles
Use Matplotlib's object-oriented API and temporary style contexts:
import matplotlib.pyplot as plt
from style_presets import style_context
with style_context("default", palette_name="okabe_ito_on_white"):
fig, ax = plt.subplots(
figsize=(89 / 25.4, 60 / 25.4),
layout="constrained",
)
ax.plot(x, y, marker="o", label="Observed")
ax.set(xlabel="Time (hours)", ylabel="Response (unit)")
ax.legend()
layout="constrained" supports colorbars, nested GridSpec, subfigures, and subplot_mosaic. Do not call tight_layout() afterward; it disables constrained layout.
For exact physical dimensions, do not use bbox_inches="tight" unless the changed page size is intentional.
Axes-level functions fit custom Matplotlib layouts; figure-level functions create their own figures/facets. Do not customize Seaborn's internal artist lists as if they were stable API.
Plotly
Use write_html() for interaction and write_image()/plotly.io.write_images() for static output.
Kaleido 1.3.0 requires Chrome/Chromium; it no longer bundles Chrome.
Current static formats: PNG, JPEG, WebP, SVG, PDF. EPS is Kaleido v0-only.
Do not pass deprecated engine= or use Orca/plotly.io.kaleido.scope.
width, height, and scale control pixels; scale=3 is not inherently “300 DPI.”
WebGL traces embed raster content in PDF/SVG.
Fully offline exports need local external assets when a figure references MathJax/topojson/tiles.
The exporter refuses implicit overwrite, writes atomically, keeps vector DPI for embedded rasters, uses TIFF LZW, and can use PDF/PS Type 42 fonts. It does not validate scientific content or publisher acceptance.
For editable fonts:
PDF/PS Type 42 embeds TrueType fonts.
svg.fonttype="none" keeps text editable/searchable but does not embed fonts; appearance depends on installed fonts.
svg.fonttype="path" preserves glyph appearance as paths but loses editable/searchable text.
Use an opaque explicit background unless transparency is required; blending against another background changes apparent contrast.
6. Inspect, compare, and review
Inspect file metadata.
Audit palette contrast/grayscale separation.
Compare against a dated publisher snapshot.
View at final size in the manuscript/web context.
Manually review fonts, embedded rasters, clipping, legends, scale bars, image integrity, caption, alt text, and source data.
Re-check the live target-journal page immediately before upload.
Pinned snapshot
The examples and smoke tests use direct package pins current on 2026-07-23:
This is a dated direct-dependency snapshot, not a transitive lock. Use the project's uv lock for exact replay; this skill intentionally ships no dependency lock.
Bundled CLIs
All helpers are deterministic, network-free, bounded, reject symlink inputs/destinations where relevant, and refuse overwrite unless --force is explicit.
Supports raster images (Pillow), SVG, PDF (pypdf), and EPS/PS. Reports dimensions, DPI/effective DPI, mode, alpha, ICC presence, compression, page size, and conservative first-page PDF font resources. It does not inspect every embedded raster in a vector container.
references/sources.md: official URLs, dates, versions, and research basis.
Final review checklist
Raw data/images and transformation code are preserved.
Missing values, exclusions, bins, normalization, and uncertainty are explicit.
Baselines, scales, limits, and area/volume encodings are honest.
Color is redundant and rendered contrast was reviewed.
Figure has an accessible description/data alternative where applicable.
Physical dimensions, DPI, format, fonts, transparency, and file size were inspected after export.
Publisher rules were verified for the exact journal and phase.
No automated report is presented as a scientific, accessibility, or compliance certification.
1---2name: scientific-visualization-23description: Creates and audits truthful, accessible, publication-ready scientific figures with Matplotlib, Seaborn or Plotly, covering figure design, multi-panel layouts, uncertainty and missing-data displays, colour and contrast review, image metadata validation and journal export planning. Load alongside figures when a plot must meet a specific journal's requirements or needs an accessibility or export audit. Not for diagrams (use schematics) or illustrations (use generate-image).4summary: "Publication figure library: journal profiles, colorblind-safe palettes, uncertainty displays, metadata and export audits."5category: core6role: workflow7allowed-tools: [Read, Write, Edit, Bash, Glob, Grep]8license: MIT9version: 1.2.010author: K-Dense Inc.11metadata:12 source: https://skillmd.com/skills/synthetic-sciences/scientific-visualization-213 upstream: K-Dense-AI/scientific-agent-skills14 upstream-url: https://github.com/K-Dense-AI/scientific-agent-skills15 upstream-path: skills/scientific-visualization16 upstream-license: MIT17 upstream-version: "1.2"18 upstream-relationship: vendored with frontmatter adapted19 adapted-by: Synthetic Sciences20 skill-author: K-Dense Inc.21---2223# Scientific Visualization2425Build figures that preserve scientific meaning before optimizing appearance. Separate universal principles from dated publisher rules, preserve raw data and transformations, use color redundantly, and inspect delivered files rather than trusting plotting defaults.2627## Non-negotiable guardrails2829- Never alter, hide, invent, or selectively enhance data to improve a figure.30- Preserve raw tables/images, exclusions, missing-value codes, analysis code, normalization, binning, image adjustments, and random seeds.31- Do not infer journal requirements. Identify the exact journal, article type, figure type, and submission phase; verify its live official guidance.32- Do not claim that a palette, DPI value, format, or automated report makes a figure accessible or journal-compliant.33- Do not silently connect missing observations, suppress inconvenient points, upsample images as if detail increased, or tune axes/dual axes to exaggerate a conclusion.34- Keep interactive and static outputs as distinct deliverables. Interactive hover is not a substitute for labels, alt text, keyboard access, an accessible data table, or a static fallback.3536Read `references/publication_guidelines.md` for deceptive-encoding and integrity checks. Read `references/journal_requirements.md` only after the target and phase are known.3738## Workflow3940### 1. Define the evidence and destination4142Record:4344- audience and medium: manuscript, web, slide, poster, supplement;45- exact publisher/journal, article type, submission phase, and intended final width;46- variable semantics, units, sample/replicate structure, missing/censored values;47- estimator and uncertainty definition;48- transformations: filtering, aggregation, normalization, smoothing, bins, image processing;49- source-data paths/identifiers and output provenance.5051If requirements are not known, create a provisional general figure and label all publisher choices as pending verification.5253### 2. Choose an honest encoding5455Prefer position on a common scale. Before coding, check:5657- **Bars/areas:** normally include zero because length/area is measured from a baseline.58- **Points/lines:** nonzero limits can be valid; show context and disclose breaks.59- **Uncertainty:** name SD, SE, CI, percentile, posterior, or another interval; state `n` and the unit of replication.60- **Raw observations:** show them when feasible; do not let jitter obscure categories/values.61- **Missing data:** distinguish missing, zero, censored, and excluded; use gaps or explicit model/interpolation styling.62- **Area/volume:** scale area/volume, not radius/diameter; avoid decorative 3D.63- **Log axes:** label the base/transform and declare how zero/negative values are handled.64- **Binning/smoothing:** record edges, bandwidth/window, method, and sensitivity.65- **Normalization:** state formula/reference and keep limits consistent across compared panels.66- **Dual axes:** prefer aligned panels; if unavoidable, justify units and do not engineer apparent correlation.67- **Images:** preserve originals, disclose whole-image adjustments, show scale bars, and avoid clipped/erased background.6869### 3. Design accessibility in, not after7071- Use color plus marker, line style, hatching, direct label, or panel separation.72- Choose qualitative, sequential, diverging, or cyclic color according to data semantics.73- Audit foreground/background contrast at the rendered size.74- Make missing and out-of-range values explicit.75- Provide alt text, a longer description for complex figures, and underlying data for web delivery.76- Treat WCAG 2.2 as web guidance: 4.5:1 normal text, 3:1 large text, and 3:1 for graphical objects required for understanding; color cannot be the only cue. Applicability and exceptions matter.7778See `references/color_palettes.md`. A grayscale screen is useful but is not a complete color-vision or accessibility test.7980### 4. Implement with scoped styles8182Use Matplotlib's object-oriented API and temporary style contexts:8384```python85import matplotlib.pyplot as plt8687from style_presets import style_context8889with style_context("default", palette_name="okabe_ito_on_white"):90 fig, ax = plt.subplots(91 figsize=(89 / 25.4, 60 / 25.4),92 layout="constrained",93 )94 ax.plot(x, y, marker="o", label="Observed")95 ax.set(xlabel="Time (hours)", ylabel="Response (unit)")96 ax.legend()97```9899`layout="constrained"` supports colorbars, nested GridSpec, subfigures, and `subplot_mosaic`. Do not call `tight_layout()` afterward; it disables constrained layout.100101For exact physical dimensions, do not use `bbox_inches="tight"` unless the changed page size is intentional.102103#### Color normalization104105```python106import matplotlib as mpl107108norm = mpl.colors.TwoSlopeNorm(vmin=-2, vcenter=0, vmax=5)109cmap = mpl.colormaps["RdBu_r"].with_extremes(bad="#777777")110image = ax.imshow(values, norm=norm, cmap=cmap, interpolation="nearest")111fig.colorbar(image, ax=ax, label="Change (unit)")112```113114Use `LogNorm`, `CenteredNorm`, `SymLogNorm`, `BoundaryNorm`, or `TwoSlopeNorm` only when its mapping matches the scientific meaning.115116#### Seaborn117118Seaborn 0.13.2 uses the current `errorbar` API:119120```python121sns.lineplot(122 data=frame,123 x="time",124 y="response",125 hue="treatment",126 style="treatment",127 markers=True,128 errorbar=("ci", 95),129 n_boot=5000,130 seed=20260723,131 ax=ax,132)133```134135Axes-level functions fit custom Matplotlib layouts; figure-level functions create their own figures/facets. Do not customize Seaborn's internal artist lists as if they were stable API.136137#### Plotly138139- Use `write_html()` for interaction and `write_image()`/`plotly.io.write_images()` for static output.140- Kaleido 1.3.0 requires Chrome/Chromium; it no longer bundles Chrome.141- Current static formats: PNG, JPEG, WebP, SVG, PDF. EPS is Kaleido v0-only.142- Do not pass deprecated `engine=` or use Orca/`plotly.io.kaleido.scope`.143- `width`, `height`, and `scale` control pixels; `scale=3` is not inherently “300 DPI.”144- WebGL traces embed raster content in PDF/SVG.145- Fully offline exports need local external assets when a figure references MathJax/topojson/tiles.146147### 5. Export explicitly and record provenance148149```python150from figure_export import export_figure151152report = export_figure(153 fig,154 "outputs/figure1",155 formats=["pdf", "png"],156 dpi=600,157 bbox_inches=None, # preserve figure page dimensions158 provenance={159 "raw_data": "data/source.csv",160 "transformations": ["predeclared QC filter", "group mean"],161 "uncertainty": "95% bootstrap CI; seed 20260723",162 "missing_data": "retained as gaps",163 },164 write_manifest=True,165)166```167168The exporter refuses implicit overwrite, writes atomically, keeps vector DPI for embedded rasters, uses TIFF LZW, and can use PDF/PS Type 42 fonts. It does not validate scientific content or publisher acceptance.169170For editable fonts:171172- PDF/PS Type 42 embeds TrueType fonts.173- `svg.fonttype="none"` keeps text editable/searchable but does not embed fonts; appearance depends on installed fonts.174- `svg.fonttype="path"` preserves glyph appearance as paths but loses editable/searchable text.175176Use an opaque explicit background unless transparency is required; blending against another background changes apparent contrast.177178### 6. Inspect, compare, and review1791801. Inspect file metadata.1812. Audit palette contrast/grayscale separation.1823. Compare against a dated publisher snapshot.1834. View at final size in the manuscript/web context.1845. Manually review fonts, embedded rasters, clipping, legends, scale bars, image integrity, caption, alt text, and source data.1856. Re-check the live target-journal page immediately before upload.186187## Pinned snapshot188189The examples and smoke tests use direct package pins current on 2026-07-23:190191```bash192uv run --isolated --no-project --python 3.13 \193 --with "matplotlib==3.11.1" \194 --with "seaborn==0.13.2" \195 --with "plotly==6.9.0" \196 --with "kaleido==1.3.0" \197 --with "pillow==12.3.0" \198 --with "pypdf==6.14.2" \199 python your_figure.py200```201202This is a dated direct-dependency snapshot, not a transitive lock. Use the project's uv lock for exact replay; this skill intentionally ships no dependency lock.203204## Bundled CLIs205206All helpers are deterministic, network-free, bounded, reject symlink inputs/destinations where relevant, and refuse overwrite unless `--force` is explicit.207208### Inspect raster/vector metadata209210```bash211uv run --isolated --no-project --python 3.13 \212 --with "pillow==12.3.0" \213 python scripts/image_metadata.py figure.tiff \214 --format tiff --mode RGB --min-dpi 300 --target-width-mm 85 \215 --alpha-policy forbid216```217218Supports raster images (Pillow), SVG, PDF (pypdf), and EPS/PS. Reports dimensions, DPI/effective DPI, mode, alpha, ICC presence, compression, page size, and conservative first-page PDF font resources. It does not inspect every embedded raster in a vector container.219220### Audit palette contrast and grayscale221222```bash223uv run --isolated --no-project --python 3.13 \224 python scripts/palette_audit.py \225 --palette okabe_ito_on_white \226 --background FFFFFF \227 --role graphical228```229230Reports exact WCAG sRGB contrast plus pairwise CIE L* grayscale screening. The grayscale threshold is a heuristic, not a standard.231232### Plan/screen publisher export233234```bash235uv run --isolated --no-project --python 3.13 \236 python scripts/export_plan.py \237 --publisher nature \238 --figure-type combination \239 --width single \240 --phase final241```242243Add `--input figure.pdf` to screen machine-readable properties. Profiles are official-source snapshots accessed 2026-07-23, not automatic compliance rules.244245### Preview styles246247```bash248uv run --isolated --no-project --python 3.13 \249 --with "matplotlib==3.11.1" \250 python scripts/style_preview.py \251 --output outputs/style-preview \252 --style default \253 --palette okabe_ito_on_white \254 --formats png,svg255```256257### Inspect/write styles and smoke-test export258259```bash260uv run --isolated --no-project --python 3.13 \261 python scripts/style_presets.py --list262uv run --isolated --no-project --python 3.13 \263 python scripts/style_presets.py --show nature264uv run --isolated --no-project --python 3.13 \265 --with "matplotlib==3.11.1" \266 python scripts/figure_export.py --demo outputs/export-smoke --manifest267```268269## Assets270271- `assets/publication.mplstyle`: general print starting point.272- `assets/nature.mplstyle`: dated flagship Nature visual starting point, not a compliance preset.273- `assets/presentation.mplstyle`: larger projected-display style.274- `assets/color_palettes.py`: importable Okabe-Ito and Paul Tol values with metadata.275- `assets/publisher_profiles.json`: dated, machine-readable planning snapshots.276277Matplotlib style files omit `#` in hex colors because `#` begins comments in `.mplstyle` parsing.278279## References280281- `references/publication_guidelines.md`: integrity, deceptive encodings, accessibility, static/interactive output.282- `references/color_palettes.md`: palette semantics, exact values, WCAG contrast, grayscale caveats, color management.283- `references/journal_requirements.md`: phase-specific official publisher snapshots.284- `references/matplotlib_examples.md`: current, runnable Matplotlib/Seaborn/Plotly patterns.285- `references/sources.md`: official URLs, dates, versions, and research basis.286287## Final review checklist288289- [ ] Raw data/images and transformation code are preserved.290- [ ] Missing values, exclusions, bins, normalization, and uncertainty are explicit.291- [ ] Baselines, scales, limits, and area/volume encodings are honest.292- [ ] Color is redundant and rendered contrast was reviewed.293- [ ] Figure has an accessible description/data alternative where applicable.294- [ ] Physical dimensions, DPI, format, fonts, transparency, and file size were inspected after export.295- [ ] Publisher rules were verified for the exact journal and phase.296- [ ] No automated report is presented as a scientific, accessibility, or compliance certification.
Run npx get-skill add synthetic-sciences/scientific-visualization-2 in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Creates and audits truthful, accessible, publication-ready scientific figures with Matplotlib, Seaborn or Plotly, covering figure design, multi-panel layouts, uncertainty and missing-data displays, colour and contrast review, image metadata validation and journal export planning. Load alongside figures when a plot must meet a specific journal's requirements or needs an accessibility or export audit. Not for diagrams (use schematics) or illustrations (use generate-image). It is listed under Web & Frontend on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: PASS, Skill Scanner: PASS. Capability flags: executes scripts. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free. This skill is licensed under MIT.
synthetic-sciences (@synthetic-sciences) published this skill. Their other Agent Skills are listed on their SkillMD profile.