SciTeX plotting module (alias for figrecipe)
Project description
SciTeX Plt (scitex-plt)
Publication-ready plotting with auto CSV export — sys.modules alias for figrecipe
Full Documentation · uv pip install scitex-plt[all]
Problem and Solution
| # | Problem | Solution |
|---|---|---|
| 1 | Matplotlib boilerplate for publication figures — manually setting DPI, fonts, axis labels, CSV sidecars, and mm-precision layout for every paper figure | stx.plt.subplots() — thin wrapper around figrecipe returning a tracked axes with .plot_line(...), set_xyt(...), and publication-ready defaults |
| 2 | Figure and underlying data drift apart — the PNG lives in the repo, the CSV that generated it sits in a notebook cell and eventually disappears | Auto CSV export on save — stx.io.save(fig, "plot.png") writes plot.png + plot.csv + plot.yaml atomically so the data is always reproducible |
| 3 | No way for AI agents to generate figures — coding agents need a structured API, not matplotlib's stateful pyplot | MCP tools (plt_line, plt_scatter, plt_stx_*) — agents compose publication plots from CSVs via column specs, no inline arrays needed |
Installation
pip install scitex-plt
This installs figrecipe as a dependency. scitex-plt is a sys.modules alias:
scitex_plt is figrecipe evaluates to True after import.
Architecture
flowchart LR
user["user code\nimport scitex_plt as plt"] -->|"sys.modules alias"| fr["figrecipe\n(actual implementation)"]
fr --> mpl["matplotlib"]
fr --> save["stx.io.save(fig, 'plot.png')"]
save --> png[("plot.png")]
save --> csv[("plot.csv\n(auto-tracked data)")]
save --> yaml[("plot.yaml\n(recipe / params)")]
4 Interfaces
scitex-plt exposes the same four-interface surface as the rest of the SciTeX
ecosystem (delegated to figrecipe):
Python API — import scitex_plt as plt
import scitex_plt as plt
fig, ax = plt.subplots()
ax.plot([1, 2, 3], [1, 4, 9])
plt.save(fig, "figure.png") # writes figure.png + figure.csv
CLI — scitex-plt --help
scitex-plt --help
scitex-plt info
MCP tools — plt_* namespace
AI agents call plt_line, plt_scatter, plt_stx_* etc. from CSV column specs.
Skills — figrecipe skill loaded by agents at startup
Loaded automatically by SciTeX-aware agents.
Demo
flowchart LR
data[("session.csv")] --> load["stx.io.load"]
load --> arr["NumPy / DataFrame"]
arr --> ax["ax.plot_line(...)\nax.set_xyt(...)"]
ax --> fig["fig"]
fig --> savefig["stx.io.save(fig, 'plot.png')"]
savefig --> png[("plot.png")]
savefig --> sidecar[("plot.csv\nplot.yaml")]
Quick Start
import scitex_plt as plt
fig, ax = plt.subplots()
ax.plot([1, 2, 3], [1, 4, 9])
plt.save(fig, "figure.png") # writes figure.png + figure.csv
Part of SciTeX
scitex-plt is part of SciTeX — a Python framework for
reproducible scientific computing. It is the namespace alias for
figrecipe, used by sibling
packages such as scitex-stats, scitex-io, and scitex-clew.
Install via pip install scitex[plt], then use scitex.plt from Python or scitex plt from the CLI.
pip install scitex[plt] # pulls scitex-plt as part of the umbrella
import scitex as stx
stx.plt.subplots() # routed through scitex.plt → figrecipe
scitex plt --help # umbrella subcommand
The SciTeX system follows the Four Freedoms for Research below, inspired by the Free Software Definition:
Four Freedoms for Research
- The freedom to run your research anywhere — your machine, your terms.
- The freedom to study how every step works — from raw data to final manuscript.
- The freedom to redistribute your workflows, not just your papers.
- The freedom to modify any module and share improvements with the community.
AGPL-3.0 — because we believe research infrastructure deserves the same freedoms as the software it runs on.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scitex_plt-0.24.6.tar.gz.
File metadata
- Download URL: scitex_plt-0.24.6.tar.gz
- Upload date:
- Size: 8.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
199d4622bb2c46344e8d6a2c3693b4f886977509743aeeedab8321d29f701414
|
|
| MD5 |
a8a15719328bb16e3f1caa8e7a3fb670
|
|
| BLAKE2b-256 |
12a9e41d41a6c1e1551999ebc1165607d8c9a1b4e4eb203e732317c6963ca9c5
|
Provenance
The following attestation bundles were made for scitex_plt-0.24.6.tar.gz:
Publisher:
pypi-publish-and-github-release-on-tag.yml on ywatanabe1989/scitex-plt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scitex_plt-0.24.6.tar.gz -
Subject digest:
199d4622bb2c46344e8d6a2c3693b4f886977509743aeeedab8321d29f701414 - Sigstore transparency entry: 1624938866
- Sigstore integration time:
-
Permalink:
ywatanabe1989/scitex-plt@0950bddd52243b361db9296eddadccdc09072078 -
Branch / Tag:
refs/tags/v0.24.6 - Owner: https://github.com/ywatanabe1989
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish-and-github-release-on-tag.yml@0950bddd52243b361db9296eddadccdc09072078 -
Trigger Event:
push
-
Statement type:
File details
Details for the file scitex_plt-0.24.6-py3-none-any.whl.
File metadata
- Download URL: scitex_plt-0.24.6-py3-none-any.whl
- Upload date:
- Size: 8.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df19f48b283c0fa9b137cd390217760f0eac3b9827cd9dd1f8da91582e74221d
|
|
| MD5 |
ca488e2aaf2718ff76043ce7bc437493
|
|
| BLAKE2b-256 |
fbd66a151ca07f14bf490fa558ddc1099884a99ce621056cf0d8ceb2ee44bd44
|
Provenance
The following attestation bundles were made for scitex_plt-0.24.6-py3-none-any.whl:
Publisher:
pypi-publish-and-github-release-on-tag.yml on ywatanabe1989/scitex-plt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scitex_plt-0.24.6-py3-none-any.whl -
Subject digest:
df19f48b283c0fa9b137cd390217760f0eac3b9827cd9dd1f8da91582e74221d - Sigstore transparency entry: 1624938906
- Sigstore integration time:
-
Permalink:
ywatanabe1989/scitex-plt@0950bddd52243b361db9296eddadccdc09072078 -
Branch / Tag:
refs/tags/v0.24.6 - Owner: https://github.com/ywatanabe1989
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish-and-github-release-on-tag.yml@0950bddd52243b361db9296eddadccdc09072078 -
Trigger Event:
push
-
Statement type: