plotprofile API

Submodules

plotprofile.cli module

Command line entry point: plot a reaction profile from JSON files.

plotprofile.cli.build_parser()[source]

Build the argument parser.

plotprofile.cli.main(argv=None)[source]

Plot a profile from JSON files. Returns a process exit code.

plotprofile.plot module

Reaction profile plotting.

class plotprofile.plot.ReactionProfilePlotter(style='default', **kwargs)[source]

Bases: object

Draws reaction profiles. Style keys come from styles.json, overridden by kwargs.

plot(energy_data, filename=None, annotations=None, point_labels=None, file_format='png', dpi=600, include_keys=None, exclude_from_legend=None, secondary=None, x=None)[source]

Draw a profile from a dict of named series, a list of lists, or a single list.

x gives the series a real reaction coordinate instead of the point index. Annotations are given in indices either way.

Saves to filename.`file_format` if a filename is given. Returns None, so that Jupyter’s inline backend does not display the figure twice.

plotprofile.plot.cubic_bezier_points(p0, p1, p2, p3, num=500)[source]

Sample a cubic bezier defined by control points p0-p3.

plotprofile.plot.desaturate_colour(color, factor=1.2)[source]

Desaturate a colour, for the fill under a curve.

plotprofile.plot.generate_coordinates(energies)[source]

Map a list of energies to (x, y) points, skipping None and centring repeats.

A repeated value spans its indices and is placed at their midpoint; None leaves a gap in the x-positions rather than shifting later points left.

plotprofile.plot.plot_reaction_profile(energy_data, style='default', **kwargs)[source]

Plot a profile in one call, splitting style keys from plot arguments.