Reporting Plots#

High-level plots that take a BaseScenario (or subclass) and are registered with the reporting framework via @plot_function. See Custom plots and the reporting framework for how the registration mechanism works and how to add your own.

Registry#

Plugin management system for GAT.

This module provides tools for registering, discovering, and managing plotting functions that can be used with the GAT reporting system.

gat.registry.discover_all_plots()#

Discover and register all available plotting functions.

Return type:

None

gat.registry.discover_external_plots()#

Discover and register external plotting functions from entry points.

Return type:

None

gat.registry.discover_internal_plots()#

Discover and register internal plotting functions.

Return type:

None

gat.registry.get_plot_function(name)#

Get a registered plot function by name.

Parameters:

name (str) – Name of the plot function

Returns:

The plot function or None if not found

Return type:

Callable | None

gat.registry.get_plot_names(scenario_type=None, plot_type=None)#

Get names of registered plot functions, optionally filtered by scenario type and plot type.

Parameters:
  • scenario_type (str | None) – If provided, only return plot names for this scenario type

  • plot_type (str | None) – If provided, only return plot names for this plot type

Returns:

List of plot function names

Return type:

List[str]

gat.registry.get_plots(scenario_type=None, plot_type=None)#

Get registered plot functions, optionally filtered by scenario type and plot type.

Parameters:
  • scenario_type (str | None) – If provided, only return plots for this scenario type

  • plot_type (str | None) – If provided, only return plots for this plot type

Returns:

Dictionary of plot functions and their metadata

Return type:

Dict[str, Dict[str, Any]]

gat.registry.plot_function(scenario_type='BaseScenario', plot_type='system')#

Decorator to register a function as a plot function for GAT.

Parameters:
  • scenario_type (str | None) – The type of scenario this plot works with (e.g., “BaseScenario”, “SiennaScenario”) Defaults to “BaseScenario” which means it works with any scenario.

  • plot_type (str | None) – The type of plot. o

Returns:

The decorated function

Example

@plot_function(“MultiScenario”, “system”) def plot_generation_capacities(multi_scenario, **kwargs):

Generation#

Author: Micah Webb Date: 2025-06-09

Description: Contains plotting functions for generation reporting that take a single Scenario Object and optional keyword arguments. Designed for Scenarios with attached simulation data. The keyword arguments will be inspected by the report or plugin management system to generate additional configuration parameters for a given plot.

A function may also take a specific Concrete implementation of Scenario Object and the report init command will only generate plot functions that are compatible.

gat.quickplots.generation_plots.convert_units(data, from_unit='MWh', to_unit='GWh')#

Convert data from one energy unit to another.

Parameters:
  • data (array-like) – Data to convert

  • from_unit (str, default 'Wh') – Original unit of the data

  • to_unit (str, default 'GWh') – Target unit for conversion

Returns:

(converted_data, unit_string)

Return type:

tuple

gat.quickplots.generation_plots.plot_minmax_area_demand_windows(scenario, window_delta=3, subpath='generation/area', palette=None, backend=None)#

Generator plot that plots the min and max total demand, net demand and min vre windows for each area.

Parameters:

scenario (BaseScenario)

gat.quickplots.generation_plots.plot_minmax_system_demand_windows(scenario, window_delta=3, subpath='generation/system', palette=None, backend=None)#

Generator plot that plots the min and max total demand, net demand and min vre windows.

Parameters:

scenario (BaseScenario)

System#

Author: Micah Webb Date: 2025-06-09

Description: Contains plotting functions that take a single Scenario Object and optional keyword arguments. The keyword arguments will be inspected by the report or plugin management system to generate additional configuration parameters for a given plot.

A function may also take a specific Concrete implementation of Scenario Object and the report init command will only generate plot functions that are compatible.

gat.quickplots.system_plots.map_system_capacity(scenario, boundary_map=None, marker_scale=0.5, marker_alpha=0.8, marker_legend_cap=[100, 1000], marker_legend_edgecolor='black', marker_label_xpad=1.5, marker_label_ypad=2, marker_title_ypad=2, background_facecolor='black', background_edgecolor='white', background_alpha=0.5, padding=0.15, dpi=150, figsize=[20, 20])#

maps the system capacity

Parameters:

scenario (SiennaScenario)

gat.quickplots.system_plots.plot_generation_capacities(scenario, **kwargs)#

Plots a donut charts of system generation capacity.

Parameters:
  • scenario (BaseScenario) – MultiScenario object containing scenarios to compare

  • **kwargs – Additional arguments passed to plot_component_donut

Returns:

Generator yielding tuples of (display_name, matplotlib_axis, dataframe)