English | 简体中文
A Codex skill for reproducible, publication-size static figures with UltraPlot.
ultraplot-figures helps Codex create and revise static scientific figures. It
can also troubleshoot plotting problems, review figures, and validate outputs.
Provide the plotting data and describe the scientific question and purpose of the
figure. Include any required dimensions, output formats, or journal requirements.
The output includes a reproducible, editable Python plotting script and the
corresponding rendered figures.
This repository is a Codex skill, not the UltraPlot Python package or a standalone plotting application.
Caution
Figures generated or revised with this skill must be reviewed by the author before submission or formal release. The skill provides reproducible, editable Python plotting code and rendered figures, reducing the need to build plotting scripts from scratch. The author remains responsible for the final review and refinement of the figure's scientific communication and details in light of the research and submission requirements.
Invoke $ultraplot-figures in Codex. Provide the plotting data when creating or
replotting a figure. When revising an existing figure, include the original
plotting script whenever possible. A PDF or PNG is sufficient when only the
visible output needs review. Describe the scientific question and purpose of the
figure, along with any known dimensions, output formats, or journal requirements.
Use $ultraplot-figures.
Input: [plotting data, existing plotting script, PDF, or PNG]
Scientific question: [the question the figure should address]
Figure purpose: [what the figure should communicate]
Output requirements: [optional dimensions, formats, or journal requirements]
For a new publication figure with no width guidance, the skill may use
UltraPlot's nat2 preset (183 mm wide). It produces publication-oriented PDF
and PNG exports when no format is requested; honor the user's, journal's, or
existing project's dimensions and formats when they are specified.
Preserve the effective UltraPlot font families and fallback configuration by default. When no font guidance exists, use an installed, reproducible font appropriate to the project or journal rather than imposing a new global font. Many journals prefer a clear sans-serif style; for example, Nature requires sans-serif figure lettering and prefers Helvetica or Arial.
For Chinese text, choose an installed local CJK fallback that matches the user,
journal, or project. Microsoft YaHei (微软雅黑) is one possible example
when it is already installed; the skill does not download or globally install
fonts. Use a requested or established raster DPI, and do not force DPI settings
on vector-only output.
Use $ultraplot-figures with results.csv. Compare the treatment groups with the
control over time, including uncertainty. The figure should show the trends and
differences between groups. Return the maintainable plotting script, PDF, and
PNG, and summarize material verification issues in the response.
Send this request to Codex:
Please use $skill-installer to install ultraplot-figures from
https://github.com/lwq-star/ultraplot-figures. The skill is at the repository
root (path `.`); install it with the name `ultraplot-figures`.
The skill is available on the next turn after installation. If Codex has not
discovered it, start a new task and invoke $ultraplot-figures again.
Install UltraPlot into the interpreter that will run the plotting script. Use
that same interpreter for the MCP server; do not rely on a bare pip from an
unrelated environment:
<python> -m pip install "ultraplot[mcp]==2.7.0"Use another exact stable 2.7.x target only when the project requires it; avoid an unbounded install that could select an unsupported future release.
Or install it with conda:
conda install -n <environment> -c conda-forge ultraplotReplace <python> and <environment> with the interpreter/environment selected
by the active host and project rules. On Windows PowerShell, an explicit
interpreter is commonly invoked as & 'D:\path\to\python.exe' -m pip ...;
on POSIX shells use /path/to/python -m pip ....
Install Cartopy separately for geographic projections. Other data-reading and processing libraries depend on the task. See the official installation guide for details.
Installing or updating this skill does not execute package setup. The first invocation after an install or update performs a read-only preflight in the selected plotting environment, then may run the safe, idempotent MCP bootstrap when its conditions are met. Normal figure tasks repeat the same preflight on later invocations; a persistent first-use marker is not assumed. Review-only, status, and troubleshooting tasks keep the whole flow read-only unless repair is explicitly requested.
When data or plotting source is available, Codex retains only, as needed:
- concise, independently runnable, editable plotting code;
- preprocessing code and only the final processed data used by the figure when substantive preprocessing is required;
- the requested final figure files; for publication-oriented static figures, PDF and PNG are the usual defaults when no format is specified.
Codex performs verification internally. It does not retain verification code, notes, manifests, diagnostic renders, logs, intermediate data, exclusion tables, or other check-only files. Material assumptions and unresolved issues are summarized in the final response.
When the only input is a PDF or raster image, the skill can inspect only visible content and file information. It cannot reconstruct missing data, processing, statistical methods, or reproducible code from a rendered figure.
The skill produces static Python figures, not interactive dashboards or web applications, and does not support generating flowcharts.
Complete examples are maintained in the separate
ultraplot-figures-examples
repository, so installing this skill does not download example data or rendered
outputs.
- 2025 global M5+ earthquake skill comparison:
uses the same data and prompt to generate figures with and without
$ultraplot-figures. The case includes input data, necessary editable scripts, and final PDF and PNG outputs. - Observed-versus-predicted model comparison: uses the same Excel data and prompt to compare LR, SVR, GBRT, and DNN across four land types. The case includes input data, necessary editable scripts, and final PDF and PNG outputs.
Bug reports, usability feedback, and improvement suggestions are welcome. If you encounter an error, unclear instructions, or unexpected output, please open a GitHub issue. When possible, include your Python and UltraPlot versions, the relevant prompt or script, a minimal reproducible example, and the complete error message.
For feedback you prefer not to post publicly, contact laiwenqinstar@gmail.com. Do not include passwords, API keys, confidential data, or other sensitive information in an issue or email.
This skill is built around the open-source UltraPlot project. We thank its maintainers and contributors for developing and sharing the plotting library on which this workflow is based.
Following suggestions and feedback from the UltraPlot maintainer in cvanelteren/ultraplot-figures, the skill was comprehensively rewritten and tested, further improving the workflow. We are grateful for the maintainer's expert guidance and support.
We also thank the LINUX DO community and platform for its technical exchange, feedback, and support.