Plotting for Zoomy simulation outputs (HDF5 + VTK)
Project description
zoomy-plotting
Publication-ready plotting for Zoomy simulation outputs, with first-class support for 1D/2D/3D meshes and very large timeline datasets.
Why
- Lazy: an HDF5 file with hundreds of snapshots opens cheaply. Only the cells needed for the current plot are read from disk.
- Class-based, one
storeper session. Pass the store once to aMatplotlibPlotter; plot methods take only(ax, time_step, field, ...). - Config-driven styling. Every color, linewidth, colormap, and marker
size lives in
zoomy_plotting.CONFIG. No visual parameter is hardcoded inside the plot functions. - One API across dimensions.
plot_1d/plot_2d/plot_3dshare the same signature modulo the 3D viewpoint.
Quick start
import zoomy_plotting as zp
import matplotlib.pyplot as plt
store = zp.read_hdf5("simulation.h5") # reads metadata only
plotter = zp.MatplotlibPlotter(store)
with zp.apply_style():
fig, ax = plt.subplots()
plotter.plot_1d(ax, time_step=0, field=store.field.h)
plt.show()
store.close()
Field references
All three forms resolve to the same integer index:
plotter.plot_2d(ax, time_step=0, field=store.field.h) # attribute on Zstruct
plotter.plot_2d(ax, time_step=0, field="h") # string lookup
plotter.plot_2d(ax, time_step=0, field=0) # raw index
Styling
Three ways to restyle:
# 1. per-call kwarg override
plotter.plot_2d(ax, time_step=0, field="h", cmap="plasma")
# 2. mutate the singleton config for the rest of the session
zp.CONFIG.cmap = "plasma"
zp.CONFIG.mesh_edgecolor = "gray"
# 3. context manager that reverts on exit
with zp.apply_style(cmap="plasma", mesh_edgecolor="gray"):
plotter.plot_2d(ax, time_step=0, field="h")
Install
pip install -e .[testing] # for tests
pip install -e .[plotly] # optional plotly backend (future PR)
pip install -e .[pyvista] # optional pyvista backend (future PR)
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
zoomy_plotting-0.1.0.tar.gz
(26.0 kB
view details)
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 zoomy_plotting-0.1.0.tar.gz.
File metadata
- Download URL: zoomy_plotting-0.1.0.tar.gz
- Upload date:
- Size: 26.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bdfe3b938d373d390dfb3b7ced977677fe9b78042cd63fdc3aa58c9d105174e0
|
|
| MD5 |
ecd2f29bb0d70c0ed8d968a3c35f30ad
|
|
| BLAKE2b-256 |
058452711f8483f7a8a1ef666defcf16f125ba4f8fdf054dd67bdb59dac42190
|
File details
Details for the file zoomy_plotting-0.1.0-py3-none-any.whl.
File metadata
- Download URL: zoomy_plotting-0.1.0-py3-none-any.whl
- Upload date:
- Size: 32.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
560f20024f2125180c6ea015cf3438ff13ddd17f6c4e1c7b269277250a742267
|
|
| MD5 |
456643a5bb2ced9f80390520d90747ef
|
|
| BLAKE2b-256 |
6d1322aa8d3ad7d4ffe2d985b0065334606ea772b1e7572fde1d3c247f732a7a
|