Skip to main content

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:

  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)

Detailed documentation is under construction.

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.0b1.tar.gz (32.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.0b1-py3-none-any.whl (32.4 kB view details)

Uploaded Python 3

File details

Details for the file scilayout-0.1.0b1.tar.gz.

File metadata

  • Download URL: scilayout-0.1.0b1.tar.gz
  • Upload date:
  • Size: 32.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for scilayout-0.1.0b1.tar.gz
Algorithm Hash digest
SHA256 7c0db978de31e6faf816d0cede012f480a512ba1aee8edac248e445f06b7c22f
MD5 564dd9916a09d678a4f4cf99b2ef6158
BLAKE2b-256 459d7868f4b6984acf286a013e78c5a290c538075fb2963ac842037d43102079

See more details on using hashes here.

Provenance

The following attestation bundles were made for scilayout-0.1.0b1.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.0b1-py3-none-any.whl.

File metadata

  • Download URL: scilayout-0.1.0b1-py3-none-any.whl
  • Upload date:
  • Size: 32.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for scilayout-0.1.0b1-py3-none-any.whl
Algorithm Hash digest
SHA256 4554bfd5748c010f6d3d2f53720b36ee9fbc273ea007296efcf49a8a649ec9c1
MD5 75cdb972aebc2bca47fae18fcd5b6465
BLAKE2b-256 dfe05fa43909a2bdb5d625914962353e36c9085fc0e2fe9ed46a8e85433cc85b

See more details on using hashes here.

Provenance

The following attestation bundles were made for scilayout-0.1.0b1-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