plot_density_slice
Render a 2D density slice as a heatmap PNG to visualize molecular density distributions from simulation grid data.
Instructions
Render a 2D density slice from parse_density_grid() as a heatmap PNG (3-4).
slice_data is the 'slice_data' field from parse_density_grid() — a 2D list of float density values.
cell_lengths: optional [La, Lb] in Å for axis tick labels. axes_labels: optional [x_label, y_label], defaults to ["a (Å)", "b (Å)"]. colormap: matplotlib colormap name; 'hot', 'viridis', 'Blues' all work well.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | No | Density Slice | |
| colormap | No | hot | |
| molecule | No | ||
| slice_data | Yes | ||
| axes_labels | No | ||
| output_path | Yes | ||
| cell_lengths | No |