Metadata-Version: 2.4
Name: scilayout
Version: 0.1.2
Summary: Create axes from top left of figure in centimetres to simplify scientific figure generation.
Author: George Stuyt
License-Expression: GPL-3.0-or-later
Project-URL: Repository, https://github.com/ogeesan/scilayout.git
Project-URL: Issues, https://github.com/ogeesan/scilayout/issues
Keywords: matplotlib-figures,scientific-papers,thesis-template,matplotlib-styles,python
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: Matplotlib
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python
Classifier: Topic :: Artistic Software
Classifier: Topic :: Multimedia :: Graphics :: Presentation
Classifier: Topic :: Multimedia :: Graphics :: Editors :: Vector-Based
Classifier: Topic :: Scientific/Engineering :: Visualization
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: matplotlib
Requires-Dist: numpy
Dynamic: license-file

![Pepy Total Downloads](https://img.shields.io/pepy/dt/scilayout) [![Coverage Status](https://coveralls.io/repos/github/ogeesan/scilayout/badge.svg?branch=main)](https://coveralls.io/github/ogeesan/scilayout?branch=main)
[![EffVer Versioning](https://img.shields.io/badge/version_scheme-EffVer-0097a7)](https://jacobtomlinson.dev/effver)

# 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](https://github.com/garrettj403/SciencePlots)), but this `scilayout` supports the creation of figures which are 100% ready for embedding in documents.

```python
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](https://matplotlib.org/matplotblog/posts/pyplot-vs-object-oriented-interface/))
- A desire to produce figures entirely in code (example approaches described in blogposts from [brushingupscience.com](https://brushingupscience.com/2021/11/02/a-better-way-to-code-up-scientific-figures/#more-6299) and [dendwrite.substack](https://dendwrite.substack.com/p/a-complete-ish-guide-to-making-scientific))

<!-- show documentation site at ogeesan.github.io/scilayout centered and heading size -->
<div align="center">
  <h2><a href="https://ogeesan.github.io/scilayout">Documentation Site (github.io/scilayout)</a></h2>
</div>
