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

Uploaded Python 3

File details

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

File metadata

  • Download URL: scilayout-0.1.0b2.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.0b2.tar.gz
Algorithm Hash digest
SHA256 11b7d030d386db5a7717cc2b247176b52975ed420ce05f164848d2e1bf95bda0
MD5 41466d7d44be990dde884f6530397ce4
BLAKE2b-256 e0198db42ca921f8bfb332c3ecb560133a0b031d947bcf37245587f207a19681

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: scilayout-0.1.0b2-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.0b2-py3-none-any.whl
Algorithm Hash digest
SHA256 5edef158e1bfeeb76ca3e6bd0767adfc0002ab49ae3fcbac27d5e742c7880e8c
MD5 aeb2e26d0b93fdcabacc9da5524ef792
BLAKE2b-256 8987010b1d79a423173cf39d5e056f00a8f0bd2af5dad5dd08e9348e92005601

See more details on using hashes here.

Provenance

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