Nature-style 3D filled spectrum waterfall plot — a reusable template that turns a folder of spectra into a publication-ready figure.
Nature 投稿风格的 3D 填充光谱瀑布图模板:给定一个光谱文件夹,一键生成可见光渐变的三维瀑布图。
waterfall-plot reads a folder of spectra (two columns: wavelength + intensity) and stacks them into a true 3D waterfall plot with filled "curtains". Each spectrum is coloured along the wavelength axis with a visible-light gradient (violet → red by default), producing the classic rainbow look used in spectroscopy papers.
Key properties:
- 3D perspective — three axes:
Wavelength/Spectrum/Intensity - Filled curves — every spectrum is a solid "curtain" from baseline to peak
- Visible-light colour gradient — colour follows wavelength (configurable per band)
- Complete box frame (all 12 edges), unclipped axis labels, Times New Roman
- No hard-coded data — axis limits, spacing and colour mapping adapt to the input
- Outputs 300 + 600 dpi PNG
waterfall-plot/
├── SKILL.md # DeepSeek Harness skill documentation
├── scripts/
│ └── make_waterfall.py # plotting script (generic template)
├── data/
│ ├── spectrum_001.txt … spectrum_010.txt # 10 spectra, 400–700 nm
│ └── complex_spectra.csv # 30-min time-resolved spectrum
└── example/
└── waterfall_example.png # example output
pip install numpy matplotlib
python waterfall-plot/scripts/make_waterfall.py dataThis writes data/spectra_waterfall_600dpi.png and data/spectra_waterfall_300dpi.png.
| Flag | Default | Description |
|---|---|---|
--cmap |
visible |
visible (rainbow by wavelength), any matplotlib colormap (viridis, plasma, turbo, …), or a #hex solid colour |
--spacing |
auto |
gap between spectra; auto scales to the peak intensity, or a fixed float |
--ratio |
auto | box proportions x,y,z — e.g. 3,5.5,1.6 stretches the Spectrum axis |
--x-label |
Wavelength (nm) |
x-axis label |
--y-label |
Spectrum |
stacking-axis label |
--z-label |
Intensity (a.u.) |
intensity-axis label |
--font |
Times New Roman |
font family (e.g. Arial) |
--figsize |
3.9,5.2 |
figure size in inches width,height |
--elev / --azim |
24 / -62 |
3D view angle |
--alpha |
0.92 |
fill opacity |
--dpi |
600 |
resolution (always also emits a 300 dpi companion) |
--out |
input folder | output directory |
--prefix |
spectra_waterfall |
output filename prefix |
All defaults are also editable in the CONFIG block at the top of make_waterfall.py.
Two-column text or CSV: first column = wavelength, second column = intensity.
Header and comment (#) lines are skipped automatically.
File discovery order: spectrum_*.txt → *.txt → *.csv.
Negative baseline noise is clipped to 0 (a common handling for optical spectra).
data/spectrum_001.txt … spectrum_010.txt— 10 individual spectra, 400–700 nm, 500 points each.data/complex_spectra.csv— time-resolved spectrum, one column per minute (30 minutes).
SKILL.md registers this as a model-invocable skill. Copy the waterfall-plot
folder into your DSH skills root (e.g. %APPDATA%\dsh-desktop\harness\skills\),
then simply give the assistant a data folder and ask for a "瀑布图 / waterfall".
