Overview
Matplotlib axes aligner (mpl_axes_aligner) package contains the modules which adjust the plotting range of matplotlib.axes.Axes objects to align their origins.
mpl_axes_aligner.shift expands or shifts the plotting range of a matplotlib axis to align the origin with the given position.
mpl_axes_aligner.align adjust the plotting range of two matplotlib axes to align their origins with the given position.
Usage
import numpy as np import matplotlib.pyplot as plt import mpl_axes_aligner x = np.arange(0.0, 30, 0.1) y1 = 0.1 * x * np.sin(x) y2 = 0.001*x**3 - 0.03*x**2 + 0.12*x fig = plt.figure() ax1 = fig.add_subplot(111) ax2 = ax1.twinx() ax1.plot(x, y1, color='blue', label='Plot 1') ax2.plot(x, y2, color='red', label='Plot 2') # Align y = 0 of ax1 and ax2 with the center of figure. mpl_axes_aligner.align.yaxes(ax1, 0, ax2, 0, 0.5) plt.show()
Documentation
Installation
Install from PyPI:
pip install mpl-axes-aligner
Requirements
Python == 2.7, 3.4, 3.5, 3.6
Matplotlib == 2.2, 3.0
Python 3.7 may be available, but it is not checked.
Testing
In the top directory of mpl_axes_aligner, install required packages for the tests:
pip install -e . pip install -e .\[test\]
Run the test programs:
make test
Build documents
In the top directory of mpl_axes_aligner, install required packages for the document building:
pip install -e . pip install -e .\[doc\]
Build the documents:
make doc
License
Metadata
Release files for mpl-axes-aligner 1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mpl_axes_aligner-1.3.tar.gz | 3.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mpl_axes_aligner-1.3-py2-none-any.whl | Python 2 | none | any | Details |
Total release size: 9.5 kB
Release files / mpl_axes_aligner-1.3.tar.gz
| Download URL | mpl_axes_aligner-1.3.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fdf5afc5a540943042745af30063b48abe01337d290332695ee7d21356e41768
|
|
BLAKE2b-256 checksum How to use checksums |
b09d4d96ef72d90c7a19fe1b9fa832efc5a6daafd740e13acaa2c4067cc495c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.2
|
Release files / mpl_axes_aligner-1.3-py2-none-any.whl
| Download URL | mpl_axes_aligner-1.3-py2-none-any.whl |
|---|---|
| Size | 5.6 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
3272a04d5f3ccb0eea53a62642dfd001537440aac1b772525cc908a3bf461440
|
|
BLAKE2b-256 checksum How to use checksums |
2daff77a8c9c03ed035b2255f436e4807b57d46f020e2a646344b47575ffe42b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.2
|