CLI¶
Installing the package gives you a plotprofile command. python -m plotprofile works too.
Data comes in as JSON files. Styling lives in a --config JSON file whose keys are exactly the ReactionProfilePlotter keyword arguments. Anything the config cannot express, use the Python API for.
plotprofile INPUT [-o OUT] [-f {png,svg,pdf,eps}] [--dpi N]
[--config FILE] [--secondary FILE] [--x FILE]
[--annotations FILE] [--point-labels FILE]
Data¶
Flag |
Description |
|---|---|
|
JSON energies: |
|
JSON series for the right-hand axis, e.g. bond lengths. See Secondary Axis. |
|
JSON list of real x coordinates, for a scan or an IRC. See Data Input. |
|
JSON object of segment annotations, |
|
JSON object of per-point labels. |
Styling¶
plotprofile examples/input.json --config examples/config.json --annotations examples/annotations.json
examples/config.json:
{
"curviness": 0.42,
"point_type": "hollow",
"linestyle": {"Pathway B": "--"},
"axes": "box",
"units": "kcal",
"energy": "G",
"legend": {"loc": "upper right", "prop": {"weight": "normal"}}
}
Nested keys work as they do in Python, so legend, y1 and y2 are objects.
Note
An unknown key is an error, not a warning: a typo that is merely logged gives a plot that is silently wrong.
A scan¶
plotprofile scan.json --secondary bonds.json --x coord.json --config scan_style.json -o irc -f svg
svg (or pdf) is what you want for a paper figure: vector, with the text left as real text. --dpi applies to png only.