Cost_Contributions_Analysis#
Classes:
|
Reading cost contributions from DCF output and plotting it. |
- class pyH2A.Analysis.Cost_Contributions_Analysis.Cost_Contributions_Analysis(input_file)[source]#
Reading cost contributions from DCF output and plotting it.
Notes
Cost_Contributions_Analysis does not require any input, it is sufficient to include “# Cost_Contributions_Analysis” in input file. Contributions for plotting have to provided as a dictionary with three components: Data containing the name and value for each contribution. Total containing the total value Table Group, containing the name of overarching group of values, which are shown. Dictionaries with this structure can be automatically generated by
sum_all_tables
function. If the name of a contribution contains a ‘-’, the string will be split and only the part after the ‘-’ will be displayed.Methods:
cost_breakdown_plot
([ax, figure_lean, ...])Plotting cost breakdown plot.
- cost_breakdown_plot(ax=None, figure_lean=True, plugin=None, plugin_property=None, label_offset=5.5, x_label_string='Cost / USD', x_label_string_H2='Levelized cost / USD per kg $H_{2}$', plot_kwargs={}, **kwargs)[source]#
Plotting cost breakdown plot.
- Parameters
- axmatplotlib.axes, optional
Axes object in which plot is drawn. Default is None, creating new plot.
- figure_leanbool, optional
If figure_lean is True, matplotlib.fig object is returned.
- pluginstr or None, optional
Selection of plugin from which contributions data is to be read. If None, defaults to overall H2 cost contributions.
- plugin_property: str or None, optional
Specific property of plugin from which contributions data is to be read.
- label_offsetfloat, optional
Offset for contributions labels.
- x_label_stringstr, optional
String for x axis label.
- x_label_string_H2str, optional
String for x axis label when overall H2 cost breakdown is plotted
- plot_kwargs: dict, optional
Dictionary containing optional keyword arguments for
Figure_Lean()
, has priority over **kwargs.- **kwargs:
Additional kwargs passed to
Figure_Lean()
- Returns
- figurematplotlib.fig or None
matplotlib.fig is returned if figure_lean is True.
Notes
Names of contributions are split at ‘-’ symbols and only the last part is displayed. For example: Direct Capital Costs - Installation is displayed only as Installation.