Create axes from top left of figure in centimetres to simplify scientific figure generation.
Project description
What is scilayout?
[!WARNING]
This package is in beta.
pip install scilayout
Scilayout is a Python package to make creating multi-panel scientific figures easier, faster, and maybe a little bit more fun. The core idea is to build figures using coordinates in centimetres from the top left using interactive plotting. This approach has a few main benefits:
- The iterative process of building figures up from scratch is easier.
- Complex layouts can be interchanged more easily.
- Exported figure sizes are explicitly stated (in centimetres) for seamless embedding in documents.
There are many guides for Matplotlib styling for scientific publication, and there are a number of packages that make this process easier (e.g. SciencePlots), but this scilayout supports the creation of figures which are 100% ready for embedding in documents.
import scilayout
fig = scilayout.figure() # it's a matplotlib figure like plt.figure()
myax = fig.add_panel((1, 1, 5, 5)) # creates a panel with position specified in cm
# %%
myax.set_location((2, 10, 5, 3), method='size') # move the panel after it's been created and set it's location and dimensions based on size (5x3cm dimensions from 2cm down and 10 cm left)
This package is designed for people with:
- A basic understanding of
matplotlib'sAxesobject and how to work with it (rather than only usingplt, the differences described here) - A desire to produce figures entirely in code (example approaches described in blogposts from brushingupscience.com and dendwrite.substack)
Project details
Release history Release notifications | RSS feed
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 scilayout-0.1.2.tar.gz.
File metadata
- Download URL: scilayout-0.1.2.tar.gz
- Upload date:
- Size: 33.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
072de89591245f7d677f9651ad5c0229e9dfb740f6a880f07a167df72bb29f5a
|
|
| MD5 |
61745e1fd46c7026574c83e7f61b1292
|
|
| BLAKE2b-256 |
d393ef245f27af0203391e1a60392e7d4e6966d6c03213c2491f3b08abdec289
|
Provenance
The following attestation bundles were made for scilayout-0.1.2.tar.gz:
Publisher:
publish.yml on ogeesan/scilayout
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scilayout-0.1.2.tar.gz -
Subject digest:
072de89591245f7d677f9651ad5c0229e9dfb740f6a880f07a167df72bb29f5a - Sigstore transparency entry: 621754677
- Sigstore integration time:
-
Permalink:
ogeesan/scilayout@2e448eed2ff15e2b1f04c5efa3c718252fbdb57f -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/ogeesan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2e448eed2ff15e2b1f04c5efa3c718252fbdb57f -
Trigger Event:
push
-
Statement type:
File details
Details for the file scilayout-0.1.2-py3-none-any.whl.
File metadata
- Download URL: scilayout-0.1.2-py3-none-any.whl
- Upload date:
- Size: 32.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
39c234b0c2030fb4ce12e5c043440c332f4a43d9bb6c6c569908d00c8d6fd4da
|
|
| MD5 |
b8b22cb2d9544cfed9fd92e7a2adad3e
|
|
| BLAKE2b-256 |
8535cd6a1056c8bfca9e08fa09f170585b5da002b08acff124ec510da62069b1
|
Provenance
The following attestation bundles were made for scilayout-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on ogeesan/scilayout
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scilayout-0.1.2-py3-none-any.whl -
Subject digest:
39c234b0c2030fb4ce12e5c043440c332f4a43d9bb6c6c569908d00c8d6fd4da - Sigstore transparency entry: 621754678
- Sigstore integration time:
-
Permalink:
ogeesan/scilayout@2e448eed2ff15e2b1f04c5efa3c718252fbdb57f -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/ogeesan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2e448eed2ff15e2b1f04c5efa3c718252fbdb57f -
Trigger Event:
push
-
Statement type: