molcrafts-molplot
Unified scientific charting for the MolCrafts stack — the Python / matplotlib half of MolPlot.
It wraps scienceplots and injects
MolPlot's unified preset (palette, type scale, grid, light/dark) so a figure
made here matches the same preset rendered in the browser by the TypeScript
package @molcrafts/molplot.
The bridge between the two renderers is the Vega-Lite spec — a portable JSON intermediate language. Build a spec in Python and either ship it to the web or render it to matplotlib for a publication figure.
Install
pip install molcrafts-molplot
# optional exact web-parity export (real Vega engine → PNG/SVG):
pip install "molcrafts-molplot[convert]"
Style — scienceplots + unified preset
import matplotlib.pyplot as plt
import molplot
molplot.use("molplot") # scienceplots base + MolPlot overlay
# or a publication variant (serif, high-DPI, scienceplots 'nature' base):
molplot.use("molplot-paper")
with molplot.style("molplot", mode="dark"):
plt.plot(x, y) # scoped; restores rcParams on exit
molplot.palette()[0] # '#0c5da5' — same categorical colours as the web
plt.style.use("molplot") also works directly (the .mplstyle files are
registered on import) — but molplot.use() additionally layers the scienceplots
base styles named by the preset.
Charts — one call, or via the portable spec
# one call → (fig, ax)
fig, ax = molplot.line(
[{"id": "E_total", "x": steps, "y": e_total},
{"id": "E_kin", "x": steps, "y": e_kin}],
x_label="step", y_label="energy (kcal/mol)", show_legend=True,
)
# or build the Vega-Lite spec and choose a renderer:
spec = molplot.scatter_spec(pc1, pc2, color=cluster_id, colorscale="viridis")
fig, ax = molplot.render(spec) # matplotlib (scienceplots)
molplot.to_png(spec, "fig.png") # exact web parity via vl-convert (optional)
import json; json.dumps(spec) # ship the same spec to the browser
line_spec / scatter_spec / bar_spec / gantt_spec emit the same Vega-Lite
shapes as the TypeScript @molcrafts/molplot builders.
License
BSD-3-Clause
Metadata
Release files for molcrafts-molplot 0.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| molcrafts_molplot-0.1.7.tar.gz | 59.7 kB | With provenance | Details for molcrafts_molplot-0.1.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| molcrafts_molplot-0.1.7-py3-none-any.whl | Python 3 | none | any | Details for molcrafts_molplot-0.1.7-py3-none-any.whl |
Total release size: 118.9 kB
Release files / molcrafts_molplot-0.1.7.tar.gz
| Download URL | molcrafts_molplot-0.1.7.tar.gz |
|---|---|
| Size | 59.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
70e2f560e06cb1ce6bf2290f43b6ec7b70d0b335794b3160deeb14589b2b24e6
|
|
BLAKE2b-256 checksum How to use checksums |
b22f9458f5adc57455575a431b61a6593efd25bd15c7acf4068aa5438a33bb25
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.
Transparency logRelease files / molcrafts_molplot-0.1.7-py3-none-any.whl
| Download URL | molcrafts_molplot-0.1.7-py3-none-any.whl |
|---|---|
| Size | 59.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7ce31b2304e23026fd2e29e05d8929c9c9864d5b0e4e899341b6877069b180b6
|
|
BLAKE2b-256 checksum How to use checksums |
5a3dbe98f3e76cbb5f37e6a2bae8bd0f56b4007b0a8b85898e4933d7645fb3e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.
Transparency logSecurity for molcrafts-molplot 0.1.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for molcrafts_molplot-0.1.7.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.