Simple Split X axes for matplotlib
Use gridspec to generate nxm grids of figures where the x axis on each figure may be an split arbitrary number of times.
The axes object presented by this package is similar (though not identical) to the axes object presented by matplotlib. This allows for a good amount of plotting code to be directly ported.
Installation
From source
git clone https://github.com/tboudreaux/splitAxes.git
cd splitAxes
pip instal -e .
From PyPi
pip install splitAxes
Examples
from splitAxes import split_grid
import numpy as np
import matplotlib.pyplot as plt
figRows = 2
figColums = 2
# this is a matrix of size rows x colums. Each entry in the matrix is the number of splits (NOT the number of final panels, which will be 1 + the number of splits) to generate
splitMatrix=np.array([[3,1],[0,2]])
fig, axs = split_grid(figRows, figColums, splitMatrix, figsize=(15,7))
# Example Data
X = np.linspace(-10,50, 1000)
Y = np.exp(-(X-0)**2) + np.exp(-(X-10)**2) + np.exp(-(X-20)**2)
axs[0,0].set_xlim(0,45)
axs[0,0].set_ylabel("Bob")
axs[1,0].plot(X,Y, color='green')
axs[1,1].scatter([0,3,4],[5,4,2])
axs[0,1].set_xlabel("Dave", position="manual", labelpos=0.67)
axs[1,0].fill_between([0,10], 0.3, alpha=0.5, color='blue')
plt.show()
This should produce an output that looks something like
Metadata
Release files for splitAxes 0.9.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| splitAxes-0.9.2.tar.gz | 51.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| splitAxes-0.9.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 66.3 kB
Release files / splitAxes-0.9.2.tar.gz
| Download URL | splitAxes-0.9.2.tar.gz |
|---|---|
| Size | 51.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bc6cbbf16eb8986e1482c5d7e735527701220fd5e95865ad66354fe257ecb197
|
|
BLAKE2b-256 checksum How to use checksums |
bb6f8107a1c1b130a2b60256573da43b57df48434ac2fd9e14ac34cdf86751e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.0
|
Release files / splitAxes-0.9.2-py3-none-any.whl
| Download URL | splitAxes-0.9.2-py3-none-any.whl |
|---|---|
| Size | 15.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3f8480a82c6c8654804ff7023e2bc1f9f894507c281874fc1a59cbf8d965f8a4
|
|
BLAKE2b-256 checksum How to use checksums |
e00b818606f3acf4beb71c3bd8e8287c0435f2d96146c6e3f1a4b892c2a04591
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.0
|
Security for splitAxes 0.9.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.