Skip to main content

SciTeX plotting module (alias for figrecipe)

Project description

SciTeX Plt (scitex-plt)

SciTeX Plt

Publication-ready plotting with auto CSV export — sys.modules alias for figrecipe

Full Documentation · uv pip install scitex-plt[all]

pypi python docs

tests install-check quality cov


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 savestx.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 APIimport 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
CLIscitex-plt --help
scitex-plt --help
scitex-plt info
MCP toolsplt_* namespace

AI agents call plt_line, plt_scatter, plt_stx_* etc. from CSV column specs.

Skillsfigrecipe 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

  1. The freedom to run your research anywhere — your machine, your terms.
  2. The freedom to study how every step works — from raw data to final manuscript.
  3. The freedom to redistribute your workflows, not just your papers.
  4. 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.


SciTeX

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

scitex_plt-0.24.6.tar.gz (8.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scitex_plt-0.24.6-py3-none-any.whl (8.4 MB view details)

Uploaded Python 3

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

Hashes for scitex_plt-0.24.6.tar.gz
Algorithm Hash digest
SHA256 199d4622bb2c46344e8d6a2c3693b4f886977509743aeeedab8321d29f701414
MD5 a8a15719328bb16e3f1caa8e7a3fb670
BLAKE2b-256 12a9e41d41a6c1e1551999ebc1165607d8c9a1b4e4eb203e732317c6963ca9c5

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for scitex_plt-0.24.6-py3-none-any.whl
Algorithm Hash digest
SHA256 df19f48b283c0fa9b137cd390217760f0eac3b9827cd9dd1f8da91582e74221d
MD5 ca488e2aaf2718ff76043ce7bc437493
BLAKE2b-256 fbd66a151ca07f14bf490fa558ddc1099884a99ce621056cf0d8ceb2ee44bd44

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page