Skip to content
/ ndplot Public

Generates n-dimensional interactive plots from a collection of figures.

License

Notifications You must be signed in to change notification settings

t3n0/ndplot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

N-dimensional plotting: ndplot

BuyMeACoffee GitHub Release Date GitHub release (latest by date) GitHub all releases PyPI - Downloads License: GPL v3

showcase_gif

This post-processing tool generates an n-dimensional plot from a given colletion of figures. There are many other tools out there that perform the very same task (e.g. napari, paraview, visit), but they all have very steep learning curves. On the other hand, ndplot is designed to be extremely easy to use, simply run

ndplot -d /dir/with/the/figures/to/plot

with figures names that must respect the following format

<optional_prefix><par1>=<val1>_<par2>=<val2>_...<parN>=<valN>.[png|jpg|gif]

For example

/dir/with/the/figures/to/plot
x0=0.0_y0=0.0_a0=0.3_b0=1.0.png
x0=0.0_y0=0.0_a0=0.3_b0=2.0.png
x0=0.0_y0=0.0_a0=0.3_b0=3.0.png
...

Also, running the tool with no flags will scan the current directory. That's it!

Finally, to navigate through the parameter space simply click on the sliders directly, or select a parameter with the numpad and scroll using the mouse wheel.

Installation

You can install ndplot from the official PyPi repository using pip

pip install ndplot

Equivalently, you can download the most recent release from here and install it manually.

Features and performaces

The command line tool provides the following flags:

  • -h prints a help dialogue;
  • -v prints the currently installed version;
  • -d input directory where the figure to be loaded are stored (optional).

Also, this tool uses a few optimizations to plot and display the graphs interactively:

  • figures are "lazy loaded", i.e. the system only reads a figure when it has to be displayed. In this way, ndplot can handle folder with thousand of plots without lagging.
  • most recent figures are cached, so to further reduce I/O usage.
  • parameters do not need to be equally spaced or to cover the whole parameter manifold. ndplot handles empty domains of the parameter space by simply falling back to the previously shown figure.

Support

I developed this tool in my spare time as I needed something to quickly plot really many figures. If you also find it usefull please consider BuyMeACoffee

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

About

Generates n-dimensional interactive plots from a collection of figures.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

Languages