pommes.visualisation.energy_cost_plot
Module for energy cost plot.
Functions
|
Plot the production cost by cost item for the selected resource. |
Module Contents
- pommes.visualisation.energy_cost_plot.plot_energy_cost(solution_path: str, resource: str, plot_choice: str, areas: list[str] | None = None, years: list[int] | None = None, title: str = 'Energy cost', save: bool = True, save_name: str = 'Energy cost') None
Plot the production cost by cost item for the selected resource.
- Parameters:
solution_path (str) – Path to the solution files containing model results.
resource (str) – The energy resource for which production costs are plotted.
plot_choice (str) – Selection mode for the plot, either ‘area’ or ‘year’. - ‘area’: Compares costs across different areas in a given year. - ‘year’: Compares costs across different years in a given area.
areas (list[str] | None, optional) – List of areas to include in the plot. If None, all areas are considered.
years (list[int] | None, optional) – List of years to include in the plot. If None, all years are considered.
title (str, optional) – Title of the plot. Defaults to “Energy cost”.
save (bool, optional) – If True, saves the figure as an image. Defaults to True.
save_name (str, optional) – Filename for saving the figure. Defaults to “Energy cost”.
- Returns:
Displays the plot and optionally saves it as an image.
- Return type:
None
- Raises:
ValueError – If plot_choice is not ‘area’ or ‘year’.
ValueError – If plot_choice is ‘area’ but multiple years are selected.
ValueError – If plot_choice is ‘year’ but multiple areas are selected.