A Codex skill for producing publication-style scientific figures from CSV, TSV, or Excel data.
It focuses on clean Science/Nature-inspired plots for papers, academic reports, and talks:
- multi-series line curves
- marker line charts
- mean bar charts with error bars and optional raw points
- histograms with normal or lognormal fit curves
- scatter plots with optional regression lines and equations
- low-saturation
science-muteddefault palette - compact, borderless legends with automatic best placement
- SVG/PDF-first export with high-DPI PNG previews
skills/science-plotting/
SKILL.md
agents/openai.yaml
scripts/
references/
assets/
tests/smoke_test.py
requirements.txt
Copy the skill folder into your Codex skills directory:
mkdir -p ~/.codex/skills
cp -r skills/science-plotting ~/.codex/skills/On Windows PowerShell:
New-Item -ItemType Directory -Force $env:USERPROFILE\.codex\skills
Copy-Item -Recurse .\skills\science-plotting $env:USERPROFILE\.codex\skills\Install plotting dependencies if you want to run the bundled scripts directly:
python -m pip install -r requirements.txtPython 3.8 or newer is recommended. The dependency range keeps compatibility with Python 3.8 while still working on newer Python versions used by GitHub Actions.
Line plot:
python skills/science-plotting/scripts/plot_science_curves.py \
docs/data/nasa-gistemp-global-annual.csv \
--x Year \
--ycols "Annual anomaly" "5-year mean" \
--ylabel "Temperature anomaly (deg C)" \
--output figure.svg \
--png figure.pngBar chart with raw points:
python skills/science-plotting/scripts/plot_science_stat.py \
docs/data/palmer-penguins-body-mass-bar.csv \
--kind bar \
--x species \
--y body_mass_g \
--hue sex \
--error sem \
--points \
--ylabel "Body mass (g)" \
--output bar.svg \
--png bar.pngBar chart with error bars only:
python skills/science-plotting/scripts/plot_science_stat.py \
docs/data/palmer-penguins-body-mass-bar.csv \
--kind bar \
--x species \
--y body_mass_g \
--hue sex \
--error sd \
--ylabel "Body mass (g)" \
--output bar-errorbar.svg \
--png bar-errorbar.pngHistogram with fit:
python skills/science-plotting/scripts/plot_science_stat.py \
docs/data/palmer-penguins-body-mass-hist.csv \
--kind hist \
--x value \
--fit normal \
--density \
--xlabel "Body mass (g)" \
--ylabel Density \
--output hist.svg \
--png hist.pngScatter with regression:
python skills/science-plotting/scripts/plot_science_stat.py \
docs/data/palmer-penguins-flipper-body-scatter.csv \
--kind scatter \
--x flipper_length_mm \
--y body_mass_g \
--regression \
--equation \
--corr \
--scatter-label Data \
--xlabel "Flipper length (mm)" \
--ylabel "Body mass (g)" \
--output scatter.svg \
--png scatter.pngSee skills/science-plotting/references/data-format.md for supported wide, long, bar, histogram, scatter, and Excel formats.
Run the smoke test:
python tests/smoke_test.pyThe smoke test compiles both scripts and renders representative line, bar, histogram, and scatter figures into a temporary directory.
- Excel files require
pandasandopenpyxl. - The default palette is
science-muted; use--palette <name>to choose another palette. - Bar charts support
--error sem,--error sd, and--error none; add--pointswhen raw replicates should be visible. - Legends default to
bestand have no border. - Use vector output (
.svgor.pdf) for manuscripts and PNG for preview.
Global temperature anomaly line plot:
Grouped bar chart with raw points:
Grouped bar chart with error bars only:
Histogram with fitted curve:
Scatter plot with fitted line:
- NASA GISTEMP global land-ocean temperature index: https://data.giss.nasa.gov/gistemp/
- Palmer Penguins morphology dataset: https://github.com/allisonhorst/palmerpenguins
Before publishing a GitHub release:
python tests/smoke_test.py
git status --short
git add .
git commit -m "Release v0.1.0"
git tag -a v0.1.0 -m "Initial science-plotting skill release"
git push origin main
git push origin v0.1.0Use semantic versioning:
v0.1.0for the first public releasev0.1.1for bug fixesv0.2.0for new chart types or visible behavior changesv1.0.0once the API and visual defaults feel stable




