NestedGridPlotter is based on matplotlib and intends to simplify the plotting of nestedgrid by providing a objected oriented class.
Project description
🚀 Quick start
To install nested-grid-plotter functionality, see the installation instructions.
For a deep overview of nested-grid-plotter functionality, see the user guide.
You can also refer to the API reference guide for an exhaustive list of all what is possible with nested-grid-plotter.
🎯 Motivations
NestedGridPlotter is based on matplotlib and intends to simplify the plotting of nestedgrid by providing a objected oriented class.
import nested_grid_plotter as ngp
plotter = ngp.NestedGridPlotter(
ngp.Figure(
constrained_layout=True, # Always use this to prevent overlappings
figsize=(10, 5),
),
builder=ngp.SubfigsBuilder(
nrows=1,
ncols=2,
sub_builders={
"the_left_sub_figure": ngp.SubplotsMosaicBuilder(
mosaic=[["lt1", "lt1"], ["lb1", "rb1"]],
gridspec_kw=dict(height_ratios=[2, 1], width_ratios=[2, 1]),
sharey=False,
),
"the_right_sub_figure": ngp.SubplotsMosaicBuilder(
mosaic=[["l2", "rt2"], ["l2", "bt2"]],
gridspec_kw=dict(height_ratios=[2, 1], width_ratios=[2, 1]),
sharey=False,
),
},
),
)
plotter.identify_axes() # Helper to add the name of the axis on the plot
plotter.fig
Example of figure with nested figures and axes built using nested_grid_plotter.
It provide multiple utilities such as grid alignment:
Example of grid ticks alignment made easy thanks to nested_grid_plotter.
As well as wrapper for complex plots and animations.
Example of complex animation built using nested_grid_plotter.
It also allows to make legend positioning and gathering flexible and simpler with some automatic placement solvers:
Example of figure with semi-automatic legend placement to avoid overlappings with axis labels and plots.
The complete and up to date documentation can be found here: https://nested_grid_plotter.readthedocs.io.
In addition to simplifying the matplotlib workflow, our focus are:
To provide understandable, modern code using the high-level language python, while using typing, explicit function names and standardized formatting thanks to Ruff and ty;
To provide detailed and explicit documentation;
To offer totally free code, including for commercial use, thanks to the BSD 3-Clause License;
🖋️ How to cite
If you use this piece of software in your work, please cite it as:
Collet, A. (2026). NestedGridPlotter - A matplotlib wrapper for nested grids and some more.
Zenodo. DOI: `10.5281/zenodo.18121868` https://doi.org/10.5281/zenodo.18121868
📧 Contact
For questions, suggestions, or contributions, you can reach out via:
We welcome contributions!
🔑 License
This project is released under the BSD 3-Clause License.
Copyright (c) 2026, Antoine COLLET. All rights reserved.
For more details, see the LICENSE file included in this repository.
⚠️ Disclaimer
This software is provided “as is”, without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, or non-infringement. In no event shall the authors or copyright holders be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the software or the use or other dealings in the software.
By using this software, you agree to accept full responsibility for any consequences, and you waive any claims against the authors or contributors.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nested_grid_plotter-2.1.0.tar.gz.
File metadata
- Download URL: nested_grid_plotter-2.1.0.tar.gz
- Upload date:
- Size: 4.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
02888bd8c396f06053962e6b9dfca73ea4592517edd8b81a58c8279ddedc0bff
|
|
| MD5 |
b00656683ae2622427776e919fc0a91e
|
|
| BLAKE2b-256 |
03f5cca68b9d40c3605ea03e6b91f37fa0bed86ebca67a6a5c362ade46f6c672
|
File details
Details for the file nested_grid_plotter-2.1.0-py3-none-any.whl.
File metadata
- Download URL: nested_grid_plotter-2.1.0-py3-none-any.whl
- Upload date:
- Size: 292.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f942e9cc460b2f8af5dbf8f3b82e882ff9da6bf59f32c5b061551db37564d078
|
|
| MD5 |
b5b2d85b89b71f1d26fe487092ce9f79
|
|
| BLAKE2b-256 |
8dc877d2fab7c7cb447c430719ab4774718471bfb4df1871473dfe1c01804dc8
|