4.6. figures module

figures.py

Contains the CreateFigures class.

class figures.CreateFigures(df, units, destination, program)[source]

Bases: object

line_chart_args_by_option(dr, alt_name, year_min, year_max, *args)[source]

This method generates a chart showing passed arguments under the given alternative.

Parameters:

dr: Numeric; the discount rate of the data to be charted.

alt_name: String; the OptionName of the data to be charted.

year_min: Numeric; the minimum calendar year of data to be charted.

year_max: Numeric; the maximum calendar year of data t be charted.

args: String(s); the data attributes to be charted.

Returns:

A single chart saved to the destination folder.

line_chart_arg_by_options(dr, alt_names, year_min, year_max, arg)[source]

This method generates a chart showing the passed argument under each of the passed alternatives.

Parameters:

dr: Numeric; the discount rate of the data to be charted.

alt_names: List; contains the OptionNames for which to chart data.

year_min: Numeric; the minimum calendar year of data to be charted.

year_max: Numeric; the maximum calendar year of data t be charted.

arg: String; the single data attribute to be charted.

Returns:

A single chart saved to the destination folder.

create_figures(args)[source]

This function is called by tool_main and then controls the generation of charts by the ChartFigures class.

Parameters:

args: List; attributes to include in figures.

Returns:

Charts are saved to the path_for_save folder by the ChartFigures class and this method returns to tool_main.