Skip to main content

A Python module for generating various plots using Matplotlib

Project description

pyillustrator

pyillustrator is a modular Python package designed for creating beautiful and configurable matplotlib subplot grids — perfect for creating aligned and aesthetic scientific figures, especially for publications.


Features

  • Golden, square, equal or custom aspect ratios
  • Fine control over subplot spacing, margins, and grid layout
  • Double-axis plotting with horizontal or vertical pairs
  • Centralized configuration system
  • LaTeX-friendly and publication-ready styling

Installation

To install it from the repository you can install it

git clone https://github.com/yourusername/pyillustrator.git
cd pyillustrator
pip install .

PyPi installation is also available:

pip install pyillustrator

Project Structure

pyillustrator/
├── __init__.py 
├── source/
│   ├── __init__.py         # Module exports
│   ├── plots.py            # Core plotting functions
│   ├── config.py           # Default settings and aspect ratio constants
│   └── utils.py            # Axes formatting and layout utilities

Usage

Basic grid plot

from pyillustrator import grid_plot
import matplotlib.pyplot as plt

fig, axs = grid_plot(2, 2)
axs[0,0].plot([0,1], [0,1])
plt.show()

Double grid (e.g., for comparison)

from pyillustrator import grid_plot_double
import matplotlib.pyplot as plt

fig, axs = grid_plot_double(1, 2, pair='Horizontal')
axs[0,0,0].plot(...)  # Left half
axs[0,0,1].plot(...)  # Right half
plt.show()

Custom configuration

from pyillustrator import DEFAULT_CONFIG, grid_plot
import matplotlib.pyplot as plt

config = DEFAULT_CONFIG.copy()
config["figwidth"] = 20
config["aspect"] = "Equal"
config["style"] = "seaborn"

fig, axs = grid_plot(2, 2, config)
plt.show()

License

This project is licensed under the MIT License. See the LICENSE file for details.


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

pyillustrator-0.9.6.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

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

pyillustrator-0.9.6-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file pyillustrator-0.9.6.tar.gz.

File metadata

  • Download URL: pyillustrator-0.9.6.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for pyillustrator-0.9.6.tar.gz
Algorithm Hash digest
SHA256 393b525ebd536bdb90acb4457c58c957ef40021f43163b14b9641fcbc3fa3749
MD5 555d6f6af363afe5a124d5a4ad35bf04
BLAKE2b-256 4aafbc46e18b5457e28d24b2c47706642a75164b34622546fa89eec283c840d5

See more details on using hashes here.

File details

Details for the file pyillustrator-0.9.6-py3-none-any.whl.

File metadata

  • Download URL: pyillustrator-0.9.6-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for pyillustrator-0.9.6-py3-none-any.whl
Algorithm Hash digest
SHA256 02f849762020fd76bd6a251772e3a66e37735ff4e07f948dd4799a93312e541a
MD5 5a51e8ea847921d9125a0509dc7653f9
BLAKE2b-256 af35eb03fc2f2b044fcacefd39f1af0793b03d6f202702c80e64894ca0e39bba

See more details on using hashes here.

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