Skip to content

Gen Plot Workflow

General-purpose plotting workflow for ReaxKit.

This workflow provides flexible plotting utilities for arbitrary tabular data (text, CSV, TSV, or whitespace-delimited files), without assuming any specific ReaxFF file format or column headers.

It supports multiple plot types, including: - single and multi-series line or scatter plots, - directed (arrowed) line plots, - dual y-axis plots, - tornado plots for sensitivity-style visualization, - 3D scatter plots with scalar coloring, - 2D aggregated heatmaps projected from 3D data.

Columns are selected using simple 1-based column tokens (e.g. c1, c2, c3), making the workflow suitable for rapid visualization of simulation outputs, summaries, and post-processed analysis tables.

Usage context

  • Command routing: Resolve CLI aliases and normalized command names.
  • Task execution: Build request objects and invoke registered tasks.
  • Output handling: Forward results to table, plot, export, or report flows.

Command: gen-plot

General-purpose plotting command for tabular data files. Select plot behavior with --type and provide the related flags for that type.

Examples


  1. Single plot:
   reaxkit gen-plot --type single --file msd.csv --xaxis c1 --yaxis c2 --plot

  2. Directed plot:
   reaxkit gen-plot --type directed --file table.csv --xaxis c1 --yaxis c2 --save directed.png

  3. Heatmap2d plot:
   reaxkit gen-plot --type heatmap2d --file table.csv --x c1 --y c2 --z c3 --value c4 --plane xz --bins 100,80 --save heat_xz.png

Arguments

Scientific choices

Flag Required Default Help Choices
--type Yes Plot type selector. Example: --type single, which enables single-plot mode. single, directed, dual, tornado, scatter3d, heatmap2d
--y1 No Left y-axis column for dual mode. Example: --y1 c2, which maps c2 to left axis.
--y2 No Right y-axis column for dual mode. Example: --y2 c3, which maps c3 to right axis.
--label No Label column for tornado mode. Example: --label c1, which provides tornado labels.
--min No Minimum-value column for tornado mode. Example: --min c2, which sets low bound column.
--max No Maximum-value column for tornado mode. Example: --max c3, which sets high bound column.
--median No Optional median column for tornado mode. Example: --median c4, which adds median markers.
--top No 0 Top-N for tornado mode. Example: --top 10, which keeps widest 10 bars.
--x No X coordinate column for scatter3d/heatmap2d. Example: --x c1, which maps column 1 to x.
--y No Y coordinate column for scatter3d/heatmap2d. Example: --y c2, which maps column 2 to y.
--z No Z coordinate column for scatter3d/heatmap2d. Example: --z c3, which maps column 3 to z.
--value No Value column for scatter3d/heatmap2d color/aggregation. Example: --value c4, which supplies scalar values.
--plane No xy Projection plane for heatmap2d. Example: --plane xz, which projects onto XZ. xy, xz, yz
--bins No 50 Heatmap bins: int or nx,ny. Example: --bins 100,80, which sets asymmetric grid resolution.

Input and file selection

Flag Required Default Help Choices
--file Yes Path to input txt/csv/tsv table. Example: --file table.csv, which loads plotting data from that file.

Outputs and plots

Flag Required Default Help Choices
--save No Path to save plot (file or directory). Example: --save figures/msd.png, which writes the generated figure to that path.
--title No Optional custom plot title. Example: --title "MSD vs Time", which overrides the default auto title.
--plot No False Generate and display/save the plot. Example: --plot, which opens the plot interactively when supported.
--xaxis No X column(s), format depends on --type. Example: --xaxis c1,c3, which selects x columns for single/dual/directed.
--yaxis No Y column(s), format depends on --type. Example: --yaxis c2,c4, which selects y columns for single/directed.
--xlabel No Optional x-axis label. Example: --xlabel Time, which customizes axis text.
--ylabel No Optional y-axis label. Example: --ylabel MSD, which customizes axis text.
--scatter No False Use scatter instead of line (single mode). Example: --scatter, which switches marker-style rendering.
--ylabel1 No Optional left y-axis label. Example: --ylabel1 Temp, which labels left axis.
--ylabel2 No Optional right y-axis label. Example: --ylabel2 Pressure, which labels right axis.
--vline No Reference vertical line for tornado mode. Example: --vline 0.0, which draws baseline.
--plot-style No default Plot appearance: default preserves existing styling; publication uses clear fonts and an accessible palette; publication-bold uses larger bold text and heavier lines. Example: --plot-style publication-bold, which improves readability when figures are reduced in a manuscript. default, publication, publication-bold
--color-style No default Color treatment: default preserves existing colors; light-fill uses lighter bar and marker interiors with the original outlines and lines. Example: --color-style light-fill, which adds contrast between fills and borders. default, light-fill
--detail-format No Optional detail format (default: Parquet; legacy: CSV). Example: --detail-format csv, which writes requested detail tables as CSV. parquet, csv

Execution

Flag Required Default Help Choices
--execution No auto Execution backend; unsupported backends fall back to serial with a logged reason. Example: --execution serial, which processes work sequentially. auto, serial, threads, processes
--workers No 0 Frame workers: auto or N (default: auto). Example: --workers 4, which requests four frame workers.
--chunk-size No 0 Maximum in-flight frames: auto or N. Example: --chunk-size 8, which limits concurrent frame processing to eight frames.

Storage and cache

Flag Required Default Help Choices
--profile No False Record deterministic function calls and timings for all Python threads (requires --diagnostics and reaxkit[profiling]).
--profile-clock No wall Profiler timer: elapsed wall time (default) or thread CPU time. Requires --profile to record. wall, cpu
--diagnostics, --no-diagnostics No False Enable a per-command report, console log, resource samples, and periodic Python stacks under logs/diagnostics (disabled by default).
--diagnostic-interval-seconds No 60.0 Python stack sampling interval (default: 60 seconds). Example: --diagnostic-interval-seconds 30.
--checkpoint, --no-checkpoint No Enable durable result batches for audited commands. Example: --no-checkpoint, disables recovery storage.
--resume No Resume a compatible result checkpoint; repeat the original scientific options. Example: --resume ./checkpoint, skips committed calculations.
--checkpoint-buffer-mb No 32 Result buffer in MiB, plus one oversized frame. Example: --checkpoint-buffer-mb 32, bounds pending result payloads to approximately 32 MiB.
--checkpoint-interval-seconds No 30 Flush at the next completed frame after this interval. Example: --checkpoint-interval-seconds 30, commits roughly every 30 seconds.
--output-profile No standard Artifact profile (default: standard). Example: --output-profile full, which includes declared optional detail artifacts. standard, minimal, full, legacy

Diagnostics and compatibility

Flag Required Default Help Choices
-h, --help No show this help message and exit
--help-all, --all-flags No Show every option, grouped by purpose. Example: --help-all, which includes advanced flags in the help output.

Common Runtime and Presentation Arguments

These are shared workflow-level CLI flags added before command-specific options, covering runtime context (engine/input/storage) and output presentation/export behavior.

Each command table above includes its shared and inherited options.