Skip to main content

Create axes from top left of figure in centimetres to simplify scientific figure generation.

Project description

Pepy Total Downloads Coverage Status EffVer Versioning

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:

  1. The iterative process of building figures up from scratch is easier.
  2. Complex layouts can be interchanged more easily.
  3. 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's Axes object and how to work with it (rather than only using plt, 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scilayout-0.1.2.tar.gz (33.5 kB view details)

Uploaded Source

Built Distribution

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

scilayout-0.1.2-py3-none-any.whl (32.7 kB view details)

Uploaded Python 3

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

Hashes for scilayout-0.1.2.tar.gz
Algorithm Hash digest
SHA256 072de89591245f7d677f9651ad5c0229e9dfb740f6a880f07a167df72bb29f5a
MD5 61745e1fd46c7026574c83e7f61b1292
BLAKE2b-256 d393ef245f27af0203391e1a60392e7d4e6966d6c03213c2491f3b08abdec289

See more details on using hashes here.

Provenance

The following attestation bundles were made for scilayout-0.1.2.tar.gz:

Publisher: publish.yml on ogeesan/scilayout

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

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

Hashes for scilayout-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 39c234b0c2030fb4ce12e5c043440c332f4a43d9bb6c6c569908d00c8d6fd4da
MD5 b8b22cb2d9544cfed9fd92e7a2adad3e
BLAKE2b-256 8535cd6a1056c8bfca9e08fa09f170585b5da002b08acff124ec510da62069b1

See more details on using hashes here.

Provenance

The following attestation bundles were made for scilayout-0.1.2-py3-none-any.whl:

Publisher: publish.yml on ogeesan/scilayout

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