This release is a pre-release and may not be stable for production use.
Scientific figures from Python, with measured layout and editable SVG/PDF output.
Combine plots, diagrams, images and native 3D artwork on a page sized in millimetres. Keep data and labels live, compile the figure, and inspect its layout and print diagnostics before exporting.
Get started · Documentation · Examples · API reference
This twenty-panel stress test includes 30,000 scatter points, 5,580 mesh triangles and 7,200 vector events. Its data are simulated. Only the dense scatter and scalar field are rasterized; the other artwork remains vector.
Inklet 3.1 adds everyday plots from CSV,
faster rendering and nested layouts,
measured diagram improvements
and dense vector lines with axis font controls.
The illustrated docs start with choosing a plot type,
then cover axes, dense data, page layout and exports. Figure planning and microscopy
ship under inklet.experimental as a research preview:
their signatures and report schemas may change.
4.0 development preview
4.0.0.dev2 adds curve-preserving clipping, painted windows, improved PDF compositing and hatching, alongside offline linked charts, maps, calibrated images, mesh fields, contours and streamlines, with saved selections and reproducible exports. It also includes date/UTC axes, facets, pandas/Polars adapters and shared plotting-quality improvements.
python -m pip install "inklet==4.0.0.dev2"
Preview guide and examples · 4.0 roadmap · Release notes
This is an opt-in development release. Experimental APIs and saved-state schemas may change; 3.1.0 remains the stable release. General browser editing, depth-aware 3D selection and the remaining 4.0 release gates are still open. Animation and presentation authoring remain in the 5.0 direction.
Install
Python 3.11 or later is required. Install from PyPI:
python -m venv .venv
source .venv/bin/activate
python -m pip install inklet
SVG/PDF output and the built-in 3D renderer need no browser or external rendering
engine. Text needs an installed font. For PNG output and visual review, install
python -m pip install 'inklet[render]'. Poppler adds independent PDF previews;
use compare_pdf=False or --no-pdf-preview for a review without it.
See installation for system packages, Windows activation,
optional dependencies and environment checks.
Your first figure
Save this as first_figure.py and run python first_figure.py:
import inklet as i
def make_document():
data = i.dataset(
{'time': [0, 1, 2, 3], 'signal': [1, 3, 2, 4]},
name='response',
source=i.Source('Quickstart demonstration', method='simulated'),
)
plot = i.plot_spec(x=(0, 3), y=(0, 5))
plot.line(data.points('time', 'signal'), name='Signal', stroke='#176b9b')
plot.axes(x='Time / s', y='Signal / mV').legend(side='bottom')
doc = i.publication('single-column').document()
doc.add('response', plot, min_height=55)
return doc
if __name__ == '__main__':
figure = make_document().compile()
figure.save('response.svg', 'response.pdf')
print(figure.report())
The document measures axis labels and the legend, fits the plot to an 89 mm page, and saves SVG and PDF with embedded text. It does not shrink the font to make the plot fit. The quickstart continues with live data edits, multiple panels and review exports.
Build, inspect, revise
With the preview dependencies installed:
inklet doctor
inklet build first_figure.py --output out/review
inklet watch first_figure.py --output out/review
build writes the vector files, PNG previews, diagnostics, a provenance manifest
and a local HTML review page. watch serves a preview at
http://127.0.0.1:8765/ and rebuilds when the authoring code changes. Review pages
support diagnostic filters, SVG highlights and comparisons with a saved revision.
For an environment without preview tools, use
inklet build first_figure.py --output out/review --vectors-only.
What you can build
| Task | Main tools | Guide |
|---|---|---|
| Scientific, educational and branded styles | preset, independent formats, live switching |
Presets |
| Multi-panel figures | document, subfigure, weighted columns, spans, panel letters |
Layout |
| Scientific plots | plot_spec, axes, bands, distributions, heatmaps, insets, polar plots |
Plotting |
| Data-driven revisions | Dataset, Series, shared scales, categories, derive, source records |
Live data |
| Architecture and flow diagrams | composition, module, named ports, measured connections, graph |
Diagrams |
| 3D and image panels | solid, model, scene, asset, explicit file dependencies |
3D and images |
| Publication exports | Physical presets, embedded or outlined text, SVG/PDF, review bundles | Export and review |
How Inklet works
A Document holds live definitions. compile() measures their contents, places
them, routes connections and produces a snapshot used by both export backends.
Updating a dataset or named instruction invalidates dependent components;
unchanged definitions can reuse their cached geometry. Earlier snapshots remain
unchanged.
Numeric lengths, including low-level text sizes, are millimetres. Use
i.pt(8) for an 8-point text size; publication profile options such as
font_pt=8 take points explicitly. Plot coordinates follow their data scales.
The direct Figure, Panel and Diagram APIs remain supported for fixed
drawings. See the authoring model for when to use each layer.
Scope and limits
- Layout respects physical constraints. Impossible fits raise
LayoutError; changing page width does not automatically rearrange the number of columns. - Diagnostics help find collisions, small type and other print issues. Review the rendered figure as well; a clean report does not establish scientific accuracy.
- Rasterization keeps dense exports compact, but dense-scatter rebuilds can still be expensive. The stress report records the workload, timings and remaining limitations.
- Reproducible appearance requires consistent inputs, fonts and dependencies. The export manifest records dataset and font hashes for comparison.
Scene rendering
Inklet combines complete Blender scenes with vector plots, labels and measurements. Cycles uses an available GPU and falls back to CPU when none is found. Render queues provide progress, cancellation and bounded concurrency. Saved camera projection and numeric passes support depth-tested paths, object masks and world-space dimensions without rerendering an annotation change.
Three editable templates cover laboratory apparatus, product presentation and architecture. The annotated laboratory combines 265 objects, twelve callouts, a measured footprint, two detail views and an analytic response plot.
PNG export uses resvg and needs no browser. Gradients, hatching and group blending remain vector in SVG/PDF. Masks and explicit rasterization create image layers; keep editable text outside them. Blender is installed separately and remains optional for ordinary plots and native vector 3D.
Rendering guide · Scene templates · Showcase library · Upgrade from 2.6 · Compatibility
Documentation and development
Read the documentation on Read the Docs. Inklet 2.6 adds scientific, educational and marketing presets. The latest documentation follows the development branch. The source Markdown is also readable on GitHub, and contributors can serve the site from a checkout:
python -m pip install -e '.[docs]'
python -m mkdocs serve
See contributing for tests, documentation checks and visual regressions. Existing users can consult migration, the v2.5 changes and the changelog.
License
Inklet code is available under the MIT license. Included third-party meshes and structural data retain their own terms; see third-party notices.
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 inklet-4.0.0.dev2.tar.gz.
File metadata
- Download URL: inklet-4.0.0.dev2.tar.gz
- Upload date:
- Size: 39.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30bdf98f5abe5f4e389b4ff3f1add54e34c8ce79f97d39dde2445b78b46df971
|
|
| MD5 |
3f9428858366bef67231375343b6f41a
|
|
| BLAKE2b-256 |
c6e6a3a2d08676ac3a3fd0a157a3343dc814f60ad7b7de2722043016edb617ca
|
Provenance
The following attestation bundles were made for inklet-4.0.0.dev2.tar.gz:
Publisher:
publish.yml on Mapika/inklet
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
inklet-4.0.0.dev2.tar.gz -
Subject digest:
30bdf98f5abe5f4e389b4ff3f1add54e34c8ce79f97d39dde2445b78b46df971 - Sigstore transparency entry: 2759996870
- Sigstore integration time:
-
Permalink:
Mapika/inklet@f444a3d6eb775a710bd4c3ff001cb9f02f836e78 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/Mapika
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f444a3d6eb775a710bd4c3ff001cb9f02f836e78 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file inklet-4.0.0.dev2-py3-none-any.whl.
File metadata
- Download URL: inklet-4.0.0.dev2-py3-none-any.whl
- Upload date:
- Size: 982.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d9cb1fb74537f98130387923b712cebf58b939f4f2c966273b51231006ad44c
|
|
| MD5 |
c99de5dd9a5eb4bf3708354329e6edd1
|
|
| BLAKE2b-256 |
e0fd2daf9d9f88e4f55874904dbc3cf0d2493ec455f401a99cbacd66dd59502b
|
Provenance
The following attestation bundles were made for inklet-4.0.0.dev2-py3-none-any.whl:
Publisher:
publish.yml on Mapika/inklet
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
inklet-4.0.0.dev2-py3-none-any.whl -
Subject digest:
9d9cb1fb74537f98130387923b712cebf58b939f4f2c966273b51231006ad44c - Sigstore transparency entry: 2759996906
- Sigstore integration time:
-
Permalink:
Mapika/inklet@f444a3d6eb775a710bd4c3ff001cb9f02f836e78 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/Mapika
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f444a3d6eb775a710bd4c3ff001cb9f02f836e78 -
Trigger Event:
workflow_dispatch
-
Statement type: