Public API Reference

PowerGraphics.label_acronymMethod
label_acronym(s::AbstractString) -> String

Convert CamelCase segments to their uppercase initials, preserving the __ separator.

Example

label_acronym("ActivePowerVariable__HydroDispatch")       # => "APV__HD"
label_acronym("ActivePowerOutVariable__EnergyReservoirStorage")  # => "APOV__ERS"
label_acronym("SomeLabel")                                 # => "SL"
source
PowerGraphics.label_componentMethod
label_component(s::AbstractString) -> String

Extract the component type (part after __) from a label.

Example

label_component("ActivePowerVariable__HydroDispatch")  # => "HydroDispatch"
label_component("SomeLabel")                            # => "SomeLabel"
source
PowerGraphics.label_first_wordMethod
label_first_word(s::AbstractString) -> String

Extract the first CamelCase word from the label (ignoring the __ separator structure).

Example

label_first_word("ActivePowerVariable__HydroDispatch")  # => "Active"
label_first_word("HydroDispatch")                        # => "Hydro"
source
PowerGraphics.label_shortMethod
label_short(s::AbstractString) -> String

Abbreviate the variable prefix (part before __) to its uppercase initials while keeping the full component name (part after __). Labels without __ are returned unchanged. This is the default label_fn.

Example

label_short("ActivePowerVariable__HydroDispatch")             # => "APV: HydroDispatch"
label_short("ActivePowerOutVariable__EnergyReservoirStorage")  # => "APOV: EnergyReservoirStorage"
label_short("SomeLabel")                                       # => "SomeLabel"
source
PowerGraphics.label_truncateMethod
label_truncate(n::Int) -> Function

Return a label function that truncates labels longer than n characters, appending "…". Can be composed with other label functions.

Example

plot_powerdata(gen; label_fn = label_truncate(20))
# "ActivePowerVariable…"

# Compose with label_short:
plot_powerdata(gen; label_fn = s -> label_truncate(15)(label_short(s)))
source
PowerGraphics.label_variableMethod
label_variable(s::AbstractString) -> String

Extract the variable type (part before __) from a label.

Example

label_variable("ActivePowerVariable__HydroDispatch")  # => "ActivePowerVariable"
label_variable("SomeLabel")                            # => "SomeLabel"
source
PowerGraphics.plot_dataframe!Method
plot_dataframe!(plot, df)
plot_dataframe!(plot, df, time_range)
plot_dataframe_plotly!(plot, df)
plot_dataframe_plotly!(plot, df, time_range)

Plots data from a DataFrames.DataFrame where each row represents a time period and each column represents a trace, onto an existing plot handle. The _plotly variants render with the PlotlyLight backend instead of CairoMakie.

Arguments

  • plot: existing plot handle returned by a previous PowerGraphics plot call (e.g. plot_dataframe)
  • df::DataFrames.DataFrame: DataFrame where each row represents a time period and each column represents a trace.

If only the DataFrame is provided, it must have a column of DateTime values.

  • time_range::Union{DataFrames.DataFrame, Array, StepRange}: The time periods of the data

Accepted Key Words

  • curtailment::Bool: plot the curtailment with the variable
  • set_display::Bool = true: set to false to prevent the plots from displaying
  • save::String = "file_path": set a file path to save the plots
  • format::String = "png": file extension for saved plots. CairoMakie supports "png", "pdf", "svg". PlotlyLight only supports "html" (other values are written as .html with a warning).
  • seriescolor::Array: Set different colors for the plots
  • title::String = "Title": Set a title for the plots
  • stack::Bool = true: stack plot traces
  • bar::Bool : create bar plot
  • nofill::Bool : force empty area fill
  • stair::Bool: Make a stair plot instead of a stack plot
  • label_fn::Function = label_short: function applied to legend labels (typically the raw Variable__Component strings produced by PowerAnalytics). Built-in options: label_short, label_component, label_variable, label_acronym, label_first_word, label_truncate(n). Note that when combine_categories = true (the default for plot_powerdata, plot_results, and plot_fuel), columns are aggregated to category names before label_fn runs — those names don't contain __, so the default label_short is a no-op. Pass combine_categories = false to see the effect of label_fn on the raw labels.
  • legend_position::Symbol = :right: legend placement, :right or :bottom
  • legend_font_size::Number: override the legend label font size
source
PowerGraphics.plot_dataframeMethod
plot_dataframe(df)
plot_dataframe(df, time_range)

Plots data from a DataFrames.DataFrame where each row represents a time period and each column represents a trace

Arguments

  • df::DataFrames.DataFrame: DataFrame where each row represents a time period and each column represents a trace.

If only the DataFrame is provided, it must have a column of DateTime values.

  • time_range::Union{DataFrames.DataFrame, Array, StepRange}: The time periods of the data

Example

var_name = :P__ThermalStandard
df = PowerSimulations.read_variables_with_keys(results, names = [var_name])[var_name]
time_range = PowerSimulations.get_realized_timestamps(results)
plot = plot_dataframe(df, time_range)

Accepted Key Words

  • curtailment::Bool: plot the curtailment with the variable
  • set_display::Bool = true: set to false to prevent the plots from displaying
  • save::String = "file_path": set a file path to save the plots
  • format::String = "png": file extension for saved plots. CairoMakie supports "png", "pdf", "svg". PlotlyLight only supports "html" (other values are written as .html with a warning).
  • seriescolor::Array: Set different colors for the plots
  • title::String = "Title": Set a title for the plots
  • stack::Bool = true: stack plot traces
  • bar::Bool : create bar plot
  • nofill::Bool : force empty area fill
  • stair::Bool: Make a stair plot instead of a stack plot
  • label_fn::Function = label_short: function applied to legend labels (typically the raw Variable__Component strings produced by PowerAnalytics). Built-in options: label_short, label_component, label_variable, label_acronym, label_first_word, label_truncate(n). Note that when combine_categories = true (the default for plot_powerdata, plot_results, and plot_fuel), columns are aggregated to category names before label_fn runs — those names don't contain __, so the default label_short is a no-op. Pass combine_categories = false to see the effect of label_fn on the raw labels.
  • legend_position::Symbol = :right: legend placement, :right or :bottom
  • legend_font_size::Number: override the legend label font size
source
PowerGraphics.plot_dataframe_plotly!Method
plot_dataframe!(plot, df)
plot_dataframe!(plot, df, time_range)
plot_dataframe_plotly!(plot, df)
plot_dataframe_plotly!(plot, df, time_range)

Plots data from a DataFrames.DataFrame where each row represents a time period and each column represents a trace, onto an existing plot handle. The _plotly variants render with the PlotlyLight backend instead of CairoMakie.

Arguments

  • plot: existing plot handle returned by a previous PowerGraphics plot call (e.g. plot_dataframe)
  • df::DataFrames.DataFrame: DataFrame where each row represents a time period and each column represents a trace.

If only the DataFrame is provided, it must have a column of DateTime values.

  • time_range::Union{DataFrames.DataFrame, Array, StepRange}: The time periods of the data

Accepted Key Words

  • curtailment::Bool: plot the curtailment with the variable
  • set_display::Bool = true: set to false to prevent the plots from displaying
  • save::String = "file_path": set a file path to save the plots
  • format::String = "png": file extension for saved plots. CairoMakie supports "png", "pdf", "svg". PlotlyLight only supports "html" (other values are written as .html with a warning).
  • seriescolor::Array: Set different colors for the plots
  • title::String = "Title": Set a title for the plots
  • stack::Bool = true: stack plot traces
  • bar::Bool : create bar plot
  • nofill::Bool : force empty area fill
  • stair::Bool: Make a stair plot instead of a stack plot
  • label_fn::Function = label_short: function applied to legend labels (typically the raw Variable__Component strings produced by PowerAnalytics). Built-in options: label_short, label_component, label_variable, label_acronym, label_first_word, label_truncate(n). Note that when combine_categories = true (the default for plot_powerdata, plot_results, and plot_fuel), columns are aggregated to category names before label_fn runs — those names don't contain __, so the default label_short is a no-op. Pass combine_categories = false to see the effect of label_fn on the raw labels.
  • legend_position::Symbol = :right: legend placement, :right or :bottom
  • legend_font_size::Number: override the legend label font size
source
PowerGraphics.plot_dataframe_plotlyMethod
plot_dataframe(df)
plot_dataframe(df, time_range)

Plots data from a DataFrames.DataFrame where each row represents a time period and each column represents a trace

Arguments

  • df::DataFrames.DataFrame: DataFrame where each row represents a time period and each column represents a trace.

If only the DataFrame is provided, it must have a column of DateTime values.

  • time_range::Union{DataFrames.DataFrame, Array, StepRange}: The time periods of the data

Example

var_name = :P__ThermalStandard
df = PowerSimulations.read_variables_with_keys(results, names = [var_name])[var_name]
time_range = PowerSimulations.get_realized_timestamps(results)
plot = plot_dataframe(df, time_range)

Accepted Key Words

  • curtailment::Bool: plot the curtailment with the variable
  • set_display::Bool = true: set to false to prevent the plots from displaying
  • save::String = "file_path": set a file path to save the plots
  • format::String = "png": file extension for saved plots. CairoMakie supports "png", "pdf", "svg". PlotlyLight only supports "html" (other values are written as .html with a warning).
  • seriescolor::Array: Set different colors for the plots
  • title::String = "Title": Set a title for the plots
  • stack::Bool = true: stack plot traces
  • bar::Bool : create bar plot
  • nofill::Bool : force empty area fill
  • stair::Bool: Make a stair plot instead of a stack plot
  • label_fn::Function = label_short: function applied to legend labels (typically the raw Variable__Component strings produced by PowerAnalytics). Built-in options: label_short, label_component, label_variable, label_acronym, label_first_word, label_truncate(n). Note that when combine_categories = true (the default for plot_powerdata, plot_results, and plot_fuel), columns are aggregated to category names before label_fn runs — those names don't contain __, so the default label_short is a no-op. Pass combine_categories = false to see the effect of label_fn on the raw labels.
  • legend_position::Symbol = :right: legend placement, :right or :bottom
  • legend_font_size::Number: override the legend label font size
source
PowerGraphics.plot_demand!Method
plot_demand!(plot, result)
plot_demand!(plot, system)
plot_demand_plotly!(plot, result)
plot_demand_plotly!(plot, system)

Plots the demand in the system onto an existing plot handle. The !-form mutates or extends plot; the _plotly variants render with the PlotlyLight backend instead of CairoMakie.

Arguments

Accepted Key Words

  • linestyle::Symbol = :dash : set line style
  • title::String: Set a title for the plots
  • horizon::Int64: To plot a shorter window of time than the full results
  • initial_time::DateTime: To start the plot at a different time other than the results initial time
  • aggregate::String = "System", "PowerLoad", or "Bus": aggregate the demand by PowerSystems.System, PowerSystems.PowerLoad, or PowerSystems.Bus, rather than by generator
  • set_display::Bool = true: set to false to prevent the plots from displaying
  • save::String = "file_path": set a file path to save the plots
  • format::String = "png": file extension for saved plots. CairoMakie supports "png", "pdf", "svg". PlotlyLight only supports "html" (other values are written as .html with a warning).
  • seriescolor::Array: Set different colors for the plots
  • title::String = "Title": Set a title for the plots
  • stack::Bool = true: stack plot traces
  • bar::Bool : create bar plot
  • nofill::Bool : force empty area fill
  • stair::Bool: Make a stair plot instead of a stack plot
  • label_fn::Function = label_short: function applied to legend labels (typically the raw Variable__Component strings produced by PowerAnalytics). Built-in options: label_short, label_component, label_variable, label_acronym, label_first_word, label_truncate(n). Note that when combine_categories = true (the default for plot_powerdata, plot_results, and plot_fuel), columns are aggregated to category names before label_fn runs — those names don't contain __, so the default label_short is a no-op. Pass combine_categories = false to see the effect of label_fn on the raw labels.
  • legend_position::Symbol = :right: legend placement, :right or :bottom
  • legend_font_size::Number: override the legend label font size
  • filter_func::Function =PowerSystems.get_available: filter components included in plot
  • palette : color palette from load_palette
source
PowerGraphics.plot_demandMethod
plot_demand(results)
plot_demand(system)

Plots the demand in the system.

Arguments

Example

res = PowerSimulations.solve_op_problem!(OpProblem)
plot = plot_demand(res)

Accepted Key Words

  • linestyle::Symbol = :dash : set line style
  • title::String: Set a title for the plots
  • horizon::Int64: To plot a shorter window of time than the full results
  • initial_time::DateTime: To start the plot at a different time other than the results initial time
  • aggregate::String = "System", "PowerLoad", or "Bus": aggregate the demand other than by generator
  • set_display::Bool = true: set to false to prevent the plots from displaying
  • save::String = "file_path": set a file path to save the plots
  • format::String = "png": file extension for saved plots. CairoMakie supports "png", "pdf", "svg". PlotlyLight only supports "html" (other values are written as .html with a warning).
  • seriescolor::Array: Set different colors for the plots
  • title::String = "Title": Set a title for the plots
  • stack::Bool = true: stack plot traces
  • bar::Bool : create bar plot
  • nofill::Bool : force empty area fill
  • stair::Bool: Make a stair plot instead of a stack plot
  • label_fn::Function = label_short: function applied to legend labels (typically the raw Variable__Component strings produced by PowerAnalytics). Built-in options: label_short, label_component, label_variable, label_acronym, label_first_word, label_truncate(n). Note that when combine_categories = true (the default for plot_powerdata, plot_results, and plot_fuel), columns are aggregated to category names before label_fn runs — those names don't contain __, so the default label_short is a no-op. Pass combine_categories = false to see the effect of label_fn on the raw labels.
  • legend_position::Symbol = :right: legend placement, :right or :bottom
  • legend_font_size::Number: override the legend label font size
  • filter_func::Function =PowerSystems.get_available: filter components included in plot
source
PowerGraphics.plot_demand_plotly!Method
plot_demand!(plot, result)
plot_demand!(plot, system)
plot_demand_plotly!(plot, result)
plot_demand_plotly!(plot, system)

Plots the demand in the system onto an existing plot handle. The !-form mutates or extends plot; the _plotly variants render with the PlotlyLight backend instead of CairoMakie.

Arguments

Accepted Key Words

  • linestyle::Symbol = :dash : set line style
  • title::String: Set a title for the plots
  • horizon::Int64: To plot a shorter window of time than the full results
  • initial_time::DateTime: To start the plot at a different time other than the results initial time
  • aggregate::String = "System", "PowerLoad", or "Bus": aggregate the demand by PowerSystems.System, PowerSystems.PowerLoad, or PowerSystems.Bus, rather than by generator
  • set_display::Bool = true: set to false to prevent the plots from displaying
  • save::String = "file_path": set a file path to save the plots
  • format::String = "png": file extension for saved plots. CairoMakie supports "png", "pdf", "svg". PlotlyLight only supports "html" (other values are written as .html with a warning).
  • seriescolor::Array: Set different colors for the plots
  • title::String = "Title": Set a title for the plots
  • stack::Bool = true: stack plot traces
  • bar::Bool : create bar plot
  • nofill::Bool : force empty area fill
  • stair::Bool: Make a stair plot instead of a stack plot
  • label_fn::Function = label_short: function applied to legend labels (typically the raw Variable__Component strings produced by PowerAnalytics). Built-in options: label_short, label_component, label_variable, label_acronym, label_first_word, label_truncate(n). Note that when combine_categories = true (the default for plot_powerdata, plot_results, and plot_fuel), columns are aggregated to category names before label_fn runs — those names don't contain __, so the default label_short is a no-op. Pass combine_categories = false to see the effect of label_fn on the raw labels.
  • legend_position::Symbol = :right: legend placement, :right or :bottom
  • legend_font_size::Number: override the legend label font size
  • filter_func::Function =PowerSystems.get_available: filter components included in plot
  • palette : color palette from load_palette
source
PowerGraphics.plot_demand_plotlyMethod
plot_demand(results)
plot_demand(system)

Plots the demand in the system.

Arguments

Example

res = PowerSimulations.solve_op_problem!(OpProblem)
plot = plot_demand(res)

Accepted Key Words

  • linestyle::Symbol = :dash : set line style
  • title::String: Set a title for the plots
  • horizon::Int64: To plot a shorter window of time than the full results
  • initial_time::DateTime: To start the plot at a different time other than the results initial time
  • aggregate::String = "System", "PowerLoad", or "Bus": aggregate the demand other than by generator
  • set_display::Bool = true: set to false to prevent the plots from displaying
  • save::String = "file_path": set a file path to save the plots
  • format::String = "png": file extension for saved plots. CairoMakie supports "png", "pdf", "svg". PlotlyLight only supports "html" (other values are written as .html with a warning).
  • seriescolor::Array: Set different colors for the plots
  • title::String = "Title": Set a title for the plots
  • stack::Bool = true: stack plot traces
  • bar::Bool : create bar plot
  • nofill::Bool : force empty area fill
  • stair::Bool: Make a stair plot instead of a stack plot
  • label_fn::Function = label_short: function applied to legend labels (typically the raw Variable__Component strings produced by PowerAnalytics). Built-in options: label_short, label_component, label_variable, label_acronym, label_first_word, label_truncate(n). Note that when combine_categories = true (the default for plot_powerdata, plot_results, and plot_fuel), columns are aggregated to category names before label_fn runs — those names don't contain __, so the default label_short is a no-op. Pass combine_categories = false to see the effect of label_fn on the raw labels.
  • legend_position::Symbol = :right: legend placement, :right or :bottom
  • legend_font_size::Number: override the legend label font size
  • filter_func::Function =PowerSystems.get_available: filter components included in plot
source
PowerGraphics.plot_fuel!Method
plot_fuel!(plot, results)
plot_fuel_plotly!(plot, results)

Plots a stack plot of the results by fuel type onto an existing plot handle and assigns each fuel type a specific color. The _plotly variant renders with the PlotlyLight backend instead of CairoMakie.

Arguments

Accepted Key Words

  • generator_mapping_file = "file_path" : file path to yaml defining generator category by fuel and primemover
  • variables::Union{Nothing, Vector{Symbol}} = nothing : specific variables to plot
  • slacks::Bool = true : display slack variables
  • load::Bool = true : display load line
  • curtailment::Bool = true: To plot the curtailment in the stack plot
  • set_display::Bool = true: set to false to prevent the plots from displaying
  • save::String = "file_path": set a file path to save the plots
  • format::String = "png": file extension for saved plots. CairoMakie supports "png", "pdf", "svg". PlotlyLight only supports "html" (other values are written as .html with a warning).
  • seriescolor::Array: Set different colors for the plots
  • title::String = "Title": Set a title for the plots
  • stack::Bool = true: stack plot traces
  • bar::Bool : create bar plot
  • nofill::Bool : force empty area fill
  • stair::Bool: Make a stair plot instead of a stack plot
  • label_fn::Function = label_short: function applied to legend labels (typically the raw Variable__Component strings produced by PowerAnalytics). Built-in options: label_short, label_component, label_variable, label_acronym, label_first_word, label_truncate(n). Note that when combine_categories = true (the default for plot_powerdata, plot_results, and plot_fuel), columns are aggregated to category names before label_fn runs — those names don't contain __, so the default label_short is a no-op. Pass combine_categories = false to see the effect of label_fn on the raw labels.
  • legend_position::Symbol = :right: legend placement, :right or :bottom
  • legend_font_size::Number: override the legend label font size
  • filter_func::Function =PowerSystems.get_available: filter components included in plot
  • palette : Color palette as from load_palette.
source
PowerGraphics.plot_fuelMethod
plot_fuel(results)

Plots a stack plot of the results by fuel type and assigns each fuel type a specific color.

Arguments

res = solve_op_problem!(OpProblem)
plot = plot_fuel(res)

Accepted Key Words

  • generator_mapping_file = "file_path" : file path to yaml defining generator category by fuel and primemover
  • variables::Union{Nothing, Vector{Symbol}} = nothing : specific variables to plot
  • slacks::Bool = true : display slack variables
  • load::Bool = true : display load line
  • curtailment::Bool = true: To plot the curtailment in the stack plot
  • set_display::Bool = true: set to false to prevent the plots from displaying
  • save::String = "file_path": set a file path to save the plots
  • format::String = "png": file extension for saved plots. CairoMakie supports "png", "pdf", "svg". PlotlyLight only supports "html" (other values are written as .html with a warning).
  • seriescolor::Array: Set different colors for the plots
  • title::String = "Title": Set a title for the plots
  • stack::Bool = true: stack plot traces
  • bar::Bool : create bar plot
  • nofill::Bool : force empty area fill
  • stair::Bool: Make a stair plot instead of a stack plot
  • label_fn::Function = label_short: function applied to legend labels (typically the raw Variable__Component strings produced by PowerAnalytics). Built-in options: label_short, label_component, label_variable, label_acronym, label_first_word, label_truncate(n). Note that when combine_categories = true (the default for plot_powerdata, plot_results, and plot_fuel), columns are aggregated to category names before label_fn runs — those names don't contain __, so the default label_short is a no-op. Pass combine_categories = false to see the effect of label_fn on the raw labels.
  • legend_position::Symbol = :right: legend placement, :right or :bottom
  • legend_font_size::Number: override the legend label font size
  • filter_func::Function =PowerSystems.get_available: filter components included in plot
source
PowerGraphics.plot_fuel_plotly!Method
plot_fuel!(plot, results)
plot_fuel_plotly!(plot, results)

Plots a stack plot of the results by fuel type onto an existing plot handle and assigns each fuel type a specific color. The _plotly variant renders with the PlotlyLight backend instead of CairoMakie.

Arguments

Accepted Key Words

  • generator_mapping_file = "file_path" : file path to yaml defining generator category by fuel and primemover
  • variables::Union{Nothing, Vector{Symbol}} = nothing : specific variables to plot
  • slacks::Bool = true : display slack variables
  • load::Bool = true : display load line
  • curtailment::Bool = true: To plot the curtailment in the stack plot
  • set_display::Bool = true: set to false to prevent the plots from displaying
  • save::String = "file_path": set a file path to save the plots
  • format::String = "png": file extension for saved plots. CairoMakie supports "png", "pdf", "svg". PlotlyLight only supports "html" (other values are written as .html with a warning).
  • seriescolor::Array: Set different colors for the plots
  • title::String = "Title": Set a title for the plots
  • stack::Bool = true: stack plot traces
  • bar::Bool : create bar plot
  • nofill::Bool : force empty area fill
  • stair::Bool: Make a stair plot instead of a stack plot
  • label_fn::Function = label_short: function applied to legend labels (typically the raw Variable__Component strings produced by PowerAnalytics). Built-in options: label_short, label_component, label_variable, label_acronym, label_first_word, label_truncate(n). Note that when combine_categories = true (the default for plot_powerdata, plot_results, and plot_fuel), columns are aggregated to category names before label_fn runs — those names don't contain __, so the default label_short is a no-op. Pass combine_categories = false to see the effect of label_fn on the raw labels.
  • legend_position::Symbol = :right: legend placement, :right or :bottom
  • legend_font_size::Number: override the legend label font size
  • filter_func::Function =PowerSystems.get_available: filter components included in plot
  • palette : Color palette as from load_palette.
source
PowerGraphics.plot_fuel_plotlyMethod
plot_fuel(results)

Plots a stack plot of the results by fuel type and assigns each fuel type a specific color.

Arguments

res = solve_op_problem!(OpProblem)
plot = plot_fuel(res)

Accepted Key Words

  • generator_mapping_file = "file_path" : file path to yaml defining generator category by fuel and primemover
  • variables::Union{Nothing, Vector{Symbol}} = nothing : specific variables to plot
  • slacks::Bool = true : display slack variables
  • load::Bool = true : display load line
  • curtailment::Bool = true: To plot the curtailment in the stack plot
  • set_display::Bool = true: set to false to prevent the plots from displaying
  • save::String = "file_path": set a file path to save the plots
  • format::String = "png": file extension for saved plots. CairoMakie supports "png", "pdf", "svg". PlotlyLight only supports "html" (other values are written as .html with a warning).
  • seriescolor::Array: Set different colors for the plots
  • title::String = "Title": Set a title for the plots
  • stack::Bool = true: stack plot traces
  • bar::Bool : create bar plot
  • nofill::Bool : force empty area fill
  • stair::Bool: Make a stair plot instead of a stack plot
  • label_fn::Function = label_short: function applied to legend labels (typically the raw Variable__Component strings produced by PowerAnalytics). Built-in options: label_short, label_component, label_variable, label_acronym, label_first_word, label_truncate(n). Note that when combine_categories = true (the default for plot_powerdata, plot_results, and plot_fuel), columns are aggregated to category names before label_fn runs — those names don't contain __, so the default label_short is a no-op. Pass combine_categories = false to see the effect of label_fn on the raw labels.
  • legend_position::Symbol = :right: legend placement, :right or :bottom
  • legend_font_size::Number: override the legend label font size
  • filter_func::Function =PowerSystems.get_available: filter components included in plot
source
PowerGraphics.plot_powerdata!Method
plot_powerdata!(plot, powerdata)
plot_powerdata_plotly!(plot, powerdata)

Makes a plot from a PowerAnalytics.PowerData object, such as the result of PowerAnalytics.get_generation_data, onto an existing plot handle. The _plotly variant renders with the PlotlyLight backend instead of CairoMakie.

Arguments

  • plot: existing plot handle returned by a previous PowerGraphics plot call (optional; e.g. plot_powerdata)
  • powerdata::PowerAnalytics.PowerData: The PowerData object to be plotted

Accepted Key Words

  • combine_categories::Bool = false : plot category values or each value in a category
  • curtailment::Bool: plot the curtailment with the variable
  • set_display::Bool = true: set to false to prevent the plots from displaying
  • save::String = "file_path": set a file path to save the plots
  • format::String = "png": file extension for saved plots. CairoMakie supports "png", "pdf", "svg". PlotlyLight only supports "html" (other values are written as .html with a warning).
  • seriescolor::Array: Set different colors for the plots
  • title::String = "Title": Set a title for the plots
  • stack::Bool = true: stack plot traces
  • bar::Bool : create bar plot
  • nofill::Bool : force empty area fill
  • stair::Bool: Make a stair plot instead of a stack plot
  • label_fn::Function = label_short: function applied to legend labels (typically the raw Variable__Component strings produced by PowerAnalytics). Built-in options: label_short, label_component, label_variable, label_acronym, label_first_word, label_truncate(n). Note that when combine_categories = true (the default for plot_powerdata, plot_results, and plot_fuel), columns are aggregated to category names before label_fn runs — those names don't contain __, so the default label_short is a no-op. Pass combine_categories = false to see the effect of label_fn on the raw labels.
  • legend_position::Symbol = :right: legend placement, :right or :bottom
  • legend_font_size::Number: override the legend label font size
source
PowerGraphics.plot_powerdataMethod
plot_powerdata(powerdata)

Makes a plot from a PowerAnalytics.PowerData object, such as the result of PowerAnalytics.get_generation_data

Arguments

  • powerdata::PowerAnalytics.PowerData: The PowerData object to be plotted

Accepted Key Words

  • combine_categories::Bool = false : plot category values or each value in a category
  • curtailment::Bool: plot the curtailment with the variable
  • set_display::Bool = true: set to false to prevent the plots from displaying
  • save::String = "file_path": set a file path to save the plots
  • format::String = "png": file extension for saved plots. CairoMakie supports "png", "pdf", "svg". PlotlyLight only supports "html" (other values are written as .html with a warning).
  • seriescolor::Array: Set different colors for the plots
  • title::String = "Title": Set a title for the plots
  • stack::Bool = true: stack plot traces
  • bar::Bool : create bar plot
  • nofill::Bool : force empty area fill
  • stair::Bool: Make a stair plot instead of a stack plot
  • label_fn::Function = label_short: function applied to legend labels (typically the raw Variable__Component strings produced by PowerAnalytics). Built-in options: label_short, label_component, label_variable, label_acronym, label_first_word, label_truncate(n). Note that when combine_categories = true (the default for plot_powerdata, plot_results, and plot_fuel), columns are aggregated to category names before label_fn runs — those names don't contain __, so the default label_short is a no-op. Pass combine_categories = false to see the effect of label_fn on the raw labels.
  • legend_position::Symbol = :right: legend placement, :right or :bottom
  • legend_font_size::Number: override the legend label font size
source
PowerGraphics.plot_powerdata_plotly!Method
plot_powerdata!(plot, powerdata)
plot_powerdata_plotly!(plot, powerdata)

Makes a plot from a PowerAnalytics.PowerData object, such as the result of PowerAnalytics.get_generation_data, onto an existing plot handle. The _plotly variant renders with the PlotlyLight backend instead of CairoMakie.

Arguments

  • plot: existing plot handle returned by a previous PowerGraphics plot call (optional; e.g. plot_powerdata)
  • powerdata::PowerAnalytics.PowerData: The PowerData object to be plotted

Accepted Key Words

  • combine_categories::Bool = false : plot category values or each value in a category
  • curtailment::Bool: plot the curtailment with the variable
  • set_display::Bool = true: set to false to prevent the plots from displaying
  • save::String = "file_path": set a file path to save the plots
  • format::String = "png": file extension for saved plots. CairoMakie supports "png", "pdf", "svg". PlotlyLight only supports "html" (other values are written as .html with a warning).
  • seriescolor::Array: Set different colors for the plots
  • title::String = "Title": Set a title for the plots
  • stack::Bool = true: stack plot traces
  • bar::Bool : create bar plot
  • nofill::Bool : force empty area fill
  • stair::Bool: Make a stair plot instead of a stack plot
  • label_fn::Function = label_short: function applied to legend labels (typically the raw Variable__Component strings produced by PowerAnalytics). Built-in options: label_short, label_component, label_variable, label_acronym, label_first_word, label_truncate(n). Note that when combine_categories = true (the default for plot_powerdata, plot_results, and plot_fuel), columns are aggregated to category names before label_fn runs — those names don't contain __, so the default label_short is a no-op. Pass combine_categories = false to see the effect of label_fn on the raw labels.
  • legend_position::Symbol = :right: legend placement, :right or :bottom
  • legend_font_size::Number: override the legend label font size
source
PowerGraphics.plot_powerdata_plotlyMethod
plot_powerdata(powerdata)

Makes a plot from a PowerAnalytics.PowerData object, such as the result of PowerAnalytics.get_generation_data

Arguments

  • powerdata::PowerAnalytics.PowerData: The PowerData object to be plotted

Accepted Key Words

  • combine_categories::Bool = false : plot category values or each value in a category
  • curtailment::Bool: plot the curtailment with the variable
  • set_display::Bool = true: set to false to prevent the plots from displaying
  • save::String = "file_path": set a file path to save the plots
  • format::String = "png": file extension for saved plots. CairoMakie supports "png", "pdf", "svg". PlotlyLight only supports "html" (other values are written as .html with a warning).
  • seriescolor::Array: Set different colors for the plots
  • title::String = "Title": Set a title for the plots
  • stack::Bool = true: stack plot traces
  • bar::Bool : create bar plot
  • nofill::Bool : force empty area fill
  • stair::Bool: Make a stair plot instead of a stack plot
  • label_fn::Function = label_short: function applied to legend labels (typically the raw Variable__Component strings produced by PowerAnalytics). Built-in options: label_short, label_component, label_variable, label_acronym, label_first_word, label_truncate(n). Note that when combine_categories = true (the default for plot_powerdata, plot_results, and plot_fuel), columns are aggregated to category names before label_fn runs — those names don't contain __, so the default label_short is a no-op. Pass combine_categories = false to see the effect of label_fn on the raw labels.
  • legend_position::Symbol = :right: legend placement, :right or :bottom
  • legend_font_size::Number: override the legend label font size
source
PowerGraphics.plot_results!Method
plot_results!(plot, results)

Makes a plot from a results dictionary

Arguments

  • plot: existing plot handle returned by a previous PowerGraphics plot call (optional; e.g. plot_results)
  • results::Dict{String, DataFrame}: The results to be plotted

Accepted Key Words

  • combine_categories::Bool = false : plot category values or each value in a category
  • curtailment::Bool: plot the curtailment with the variable
  • set_display::Bool = true: set to false to prevent the plots from displaying
  • save::String = "file_path": set a file path to save the plots
  • format::String = "png": file extension for saved plots. CairoMakie supports "png", "pdf", "svg". PlotlyLight only supports "html" (other values are written as .html with a warning).
  • seriescolor::Array: Set different colors for the plots
  • title::String = "Title": Set a title for the plots
  • stack::Bool = true: stack plot traces
  • bar::Bool : create bar plot
  • nofill::Bool : force empty area fill
  • stair::Bool: Make a stair plot instead of a stack plot
  • label_fn::Function = label_short: function applied to legend labels (typically the raw Variable__Component strings produced by PowerAnalytics). Built-in options: label_short, label_component, label_variable, label_acronym, label_first_word, label_truncate(n). Note that when combine_categories = true (the default for plot_powerdata, plot_results, and plot_fuel), columns are aggregated to category names before label_fn runs — those names don't contain __, so the default label_short is a no-op. Pass combine_categories = false to see the effect of label_fn on the raw labels.
  • legend_position::Symbol = :right: legend placement, :right or :bottom
  • legend_font_size::Number: override the legend label font size
source
PowerGraphics.plot_resultsMethod
plot_results(results)

Makes a plot from a results dictionary object

Arguments

  • results::Dict{String, DataFrame: The results to be plotted

Accepted Key Words

  • combine_categories::Bool = false : plot category values or each value in a category
  • curtailment::Bool: plot the curtailment with the variable
  • set_display::Bool = true: set to false to prevent the plots from displaying
  • save::String = "file_path": set a file path to save the plots
  • format::String = "png": file extension for saved plots. CairoMakie supports "png", "pdf", "svg". PlotlyLight only supports "html" (other values are written as .html with a warning).
  • seriescolor::Array: Set different colors for the plots
  • title::String = "Title": Set a title for the plots
  • stack::Bool = true: stack plot traces
  • bar::Bool : create bar plot
  • nofill::Bool : force empty area fill
  • stair::Bool: Make a stair plot instead of a stack plot
  • label_fn::Function = label_short: function applied to legend labels (typically the raw Variable__Component strings produced by PowerAnalytics). Built-in options: label_short, label_component, label_variable, label_acronym, label_first_word, label_truncate(n). Note that when combine_categories = true (the default for plot_powerdata, plot_results, and plot_fuel), columns are aggregated to category names before label_fn runs — those names don't contain __, so the default label_short is a no-op. Pass combine_categories = false to see the effect of label_fn on the raw labels.
  • legend_position::Symbol = :right: legend placement, :right or :bottom
  • legend_font_size::Number: override the legend label font size
source
PowerGraphics.plot_results_plotly!Method
plot_results!(plot, results)

Makes a plot from a results dictionary

Arguments

  • plot: existing plot handle returned by a previous PowerGraphics plot call (optional; e.g. plot_results)
  • results::Dict{String, DataFrame}: The results to be plotted

Accepted Key Words

  • combine_categories::Bool = false : plot category values or each value in a category
  • curtailment::Bool: plot the curtailment with the variable
  • set_display::Bool = true: set to false to prevent the plots from displaying
  • save::String = "file_path": set a file path to save the plots
  • format::String = "png": file extension for saved plots. CairoMakie supports "png", "pdf", "svg". PlotlyLight only supports "html" (other values are written as .html with a warning).
  • seriescolor::Array: Set different colors for the plots
  • title::String = "Title": Set a title for the plots
  • stack::Bool = true: stack plot traces
  • bar::Bool : create bar plot
  • nofill::Bool : force empty area fill
  • stair::Bool: Make a stair plot instead of a stack plot
  • label_fn::Function = label_short: function applied to legend labels (typically the raw Variable__Component strings produced by PowerAnalytics). Built-in options: label_short, label_component, label_variable, label_acronym, label_first_word, label_truncate(n). Note that when combine_categories = true (the default for plot_powerdata, plot_results, and plot_fuel), columns are aggregated to category names before label_fn runs — those names don't contain __, so the default label_short is a no-op. Pass combine_categories = false to see the effect of label_fn on the raw labels.
  • legend_position::Symbol = :right: legend placement, :right or :bottom
  • legend_font_size::Number: override the legend label font size
source
PowerGraphics.plot_results_plotlyMethod
plot_results(results)

Makes a plot from a results dictionary object

Arguments

  • results::Dict{String, DataFrame: The results to be plotted

Accepted Key Words

  • combine_categories::Bool = false : plot category values or each value in a category
  • curtailment::Bool: plot the curtailment with the variable
  • set_display::Bool = true: set to false to prevent the plots from displaying
  • save::String = "file_path": set a file path to save the plots
  • format::String = "png": file extension for saved plots. CairoMakie supports "png", "pdf", "svg". PlotlyLight only supports "html" (other values are written as .html with a warning).
  • seriescolor::Array: Set different colors for the plots
  • title::String = "Title": Set a title for the plots
  • stack::Bool = true: stack plot traces
  • bar::Bool : create bar plot
  • nofill::Bool : force empty area fill
  • stair::Bool: Make a stair plot instead of a stack plot
  • label_fn::Function = label_short: function applied to legend labels (typically the raw Variable__Component strings produced by PowerAnalytics). Built-in options: label_short, label_component, label_variable, label_acronym, label_first_word, label_truncate(n). Note that when combine_categories = true (the default for plot_powerdata, plot_results, and plot_fuel), columns are aggregated to category names before label_fn runs — those names don't contain __, so the default label_short is a no-op. Pass combine_categories = false to see the effect of label_fn on the raw labels.
  • legend_position::Symbol = :right: legend placement, :right or :bottom
  • legend_font_size::Number: override the legend label font size
source