Skip to main content

About Nested Grid Plotter

License Stars Python PyPI Downoads Build Status Documentation Status Coverage codacy Precommit: enabled Black Ruff Checked with ty DOI

🚀 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
nested_grid

Example of figure with nested figures and axes built using nested_grid_plotter.

It provide multiple utilities such as grid alignment:

alignment

Example of grid ticks alignment made easy thanks to nested_grid_plotter.

As well as wrapper for complex plots and animations.

animation_example

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:

complex_legend

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.

Metadata

Release files for nested-grid-plotter 2.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nested-grid-plotter 2.1.1
File Size Uploaded Provenance Actions
nested_grid_plotter-2.1.1.tar.gz 4.2 MB Without provenance Details for nested_grid_plotter-2.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nested-grid-plotter 2.1.1
File Interpreter ABI Platform Actions
nested_grid_plotter-2.1.1-py3-none-any.whl Python 3 none any Details for nested_grid_plotter-2.1.1-py3-none-any.whl

Total release size: 4.5 MB

Release files / nested_grid_plotter-2.1.1.tar.gz

Download URL nested_grid_plotter-2.1.1.tar.gz
Size 4.2 MB
Tags Source
SHA-256 checksum
How to use checksums
2ee4d0937a5c7e9113be7ddad8ff70f022885bde2428aa1db4612c75efb9cea3
BLAKE2b-256 checksum
How to use checksums
4726a283089760ea71c323da788e699df2f8f181a58cddce40ac006d7fa74661
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.11.5

Release files / nested_grid_plotter-2.1.1-py3-none-any.whl

Download URL nested_grid_plotter-2.1.1-py3-none-any.whl
Size 292.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
20f4d4bd1a8eae1582f387de91ac53b0d8427592879f27e5c1541ea06cd69f41
BLAKE2b-256 checksum
How to use checksums
868d6325e38f3ecbb2eef667aaf3fe5aade83c383e147f646850353eb1e2613d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.11.5

Security for nested-grid-plotter 2.1.1

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page