marmot.plottingmodules.plotutils.styles.GeneratorColorDict#

class GeneratorColorDict(color_dict: dict)[source]#

Bases: object

Dictionary of gen names to colors for generation plots.

The dictionary is usually set with the colour_dictionary.csv using the set_colors_from_df method. The file should have the following format:

Random colors can also be set with the set_random_colors method or assigned manually directly to the color_dict attribute.

Parameters

colors. (Dictionary of generator names to) –

Methods

set_colors_from_df(color_df)

Sets colors from a dataframe.

set_random_colors(generator_list)

Sets random colors, given a list of names/technologies

Attributes

color_dict

classmethod set_colors_from_df(color_df: pandas.core.frame.DataFrame) marmot.plottingmodules.plotutils.styles.GeneratorColorDict[source]#

Sets colors from a dataframe.

The dataframe should have the following format:

Parameters

color_df (pd.DataFrame) – DataFrame with Generator and Color column

Returns

Instance of class

Return type

GeneratorColorDict

classmethod set_random_colors(generator_list: list) marmot.plottingmodules.plotutils.styles.GeneratorColorDict[source]#

Sets random colors, given a list of names/technologies

Parameters

generator_list (list) – List of generator names.

Returns

Instance of class

Return type

GeneratorColorDict