atomica.cascade.plot_cascade¶
- atomica.cascade.plot_cascade(results=None, cascade=None, pops=None, year=None, data=None, show_table=None)[source]¶
Plot single or multiple cascade plot
plot_single_cascade()
generates a plot where multiple results each have their own figure. A common requirement (used on the FE) is to decide between callingplot_single_cascade()
or callingplot_multi_cascade()
based on whether there are multipleResult
instances or not.A multi-cascade plot will be displayed if there are multiple years or if there are multiple results. Thus this function is always guaranteed to return a single figure.
- Parameters:
results – A single
Result
instance, or list of instancescascade – A cascade specification supported by
sanitize_cascade()
pops – A population specification supported by
sanitize_pops()
- must correspond to a single aggregationyear – A single year, or multiple years (can be a scalar, list, or array)
data – A
ProjectData
instanceshow_table (
bool
) – IfTrue
and a multi-cascade plot is generated, then the loss table will also be shown
- Returns:
Figure object containing the plot that was produced