Public API Reference
PowerGraphics.label_acronym — Method
label_acronym(s::AbstractString) -> StringConvert 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"PowerGraphics.label_component — Method
label_component(s::AbstractString) -> StringExtract the component type (part after __) from a label.
Example
label_component("ActivePowerVariable__HydroDispatch") # => "HydroDispatch"
label_component("SomeLabel") # => "SomeLabel"PowerGraphics.label_first_word — Method
label_first_word(s::AbstractString) -> StringExtract the first CamelCase word from the label (ignoring the __ separator structure).
Example
label_first_word("ActivePowerVariable__HydroDispatch") # => "Active"
label_first_word("HydroDispatch") # => "Hydro"PowerGraphics.label_short — Method
label_short(s::AbstractString) -> StringAbbreviate 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"PowerGraphics.label_truncate — Method
label_truncate(n::Int) -> FunctionReturn 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)))PowerGraphics.label_variable — Method
label_variable(s::AbstractString) -> StringExtract the variable type (part before __) from a label.
Example
label_variable("ActivePowerVariable__HydroDispatch") # => "ActivePowerVariable"
label_variable("SomeLabel") # => "SomeLabel"PowerGraphics.load_palette — Method
load_palette()
load_palette(file)Loads color palette yaml from environment, the DEFAULT_PALETTE_FILE, or a given file. See color-palette.yaml for an example.
Arguments
file: path to YAML color palette
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:DataFramewhere 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 variableset_display::Bool = true: set to false to prevent the plots from displayingsave::String = "file_path": set a file path to save the plotsformat::String = "png": file extension for saved plots. CairoMakie supports"png","pdf","svg". PlotlyLight only supports"html"(other values are written as.htmlwith a warning).seriescolor::Array: Set different colors for the plotstitle::String = "Title": Set a title for the plotsstack::Bool = true: stack plot tracesbar::Bool: create bar plotnofill::Bool: force empty area fillstair::Bool: Make a stair plot instead of a stack plotlabel_fn::Function = label_short: function applied to legend labels (typically the rawVariable__Componentstrings produced by PowerAnalytics). Built-in options:label_short,label_component,label_variable,label_acronym,label_first_word,label_truncate(n). Note that whencombine_categories = true(the default forplot_powerdata,plot_results, andplot_fuel), columns are aggregated to category names beforelabel_fnruns — those names don't contain__, so the defaultlabel_shortis a no-op. Passcombine_categories = falseto see the effect oflabel_fnon the raw labels.legend_position::Symbol = :right: legend placement,:rightor:bottomlegend_font_size::Number: override the legend label font size
PowerGraphics.plot_dataframe — Method
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:DataFramewhere 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 variableset_display::Bool = true: set to false to prevent the plots from displayingsave::String = "file_path": set a file path to save the plotsformat::String = "png": file extension for saved plots. CairoMakie supports"png","pdf","svg". PlotlyLight only supports"html"(other values are written as.htmlwith a warning).seriescolor::Array: Set different colors for the plotstitle::String = "Title": Set a title for the plotsstack::Bool = true: stack plot tracesbar::Bool: create bar plotnofill::Bool: force empty area fillstair::Bool: Make a stair plot instead of a stack plotlabel_fn::Function = label_short: function applied to legend labels (typically the rawVariable__Componentstrings produced by PowerAnalytics). Built-in options:label_short,label_component,label_variable,label_acronym,label_first_word,label_truncate(n). Note that whencombine_categories = true(the default forplot_powerdata,plot_results, andplot_fuel), columns are aggregated to category names beforelabel_fnruns — those names don't contain__, so the defaultlabel_shortis a no-op. Passcombine_categories = falseto see the effect oflabel_fnon the raw labels.legend_position::Symbol = :right: legend placement,:rightor:bottomlegend_font_size::Number: override the legend label font size
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:DataFramewhere 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 variableset_display::Bool = true: set to false to prevent the plots from displayingsave::String = "file_path": set a file path to save the plotsformat::String = "png": file extension for saved plots. CairoMakie supports"png","pdf","svg". PlotlyLight only supports"html"(other values are written as.htmlwith a warning).seriescolor::Array: Set different colors for the plotstitle::String = "Title": Set a title for the plotsstack::Bool = true: stack plot tracesbar::Bool: create bar plotnofill::Bool: force empty area fillstair::Bool: Make a stair plot instead of a stack plotlabel_fn::Function = label_short: function applied to legend labels (typically the rawVariable__Componentstrings produced by PowerAnalytics). Built-in options:label_short,label_component,label_variable,label_acronym,label_first_word,label_truncate(n). Note that whencombine_categories = true(the default forplot_powerdata,plot_results, andplot_fuel), columns are aggregated to category names beforelabel_fnruns — those names don't contain__, so the defaultlabel_shortis a no-op. Passcombine_categories = falseto see the effect oflabel_fnon the raw labels.legend_position::Symbol = :right: legend placement,:rightor:bottomlegend_font_size::Number: override the legend label font size
PowerGraphics.plot_dataframe_plotly — Method
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:DataFramewhere 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 variableset_display::Bool = true: set to false to prevent the plots from displayingsave::String = "file_path": set a file path to save the plotsformat::String = "png": file extension for saved plots. CairoMakie supports"png","pdf","svg". PlotlyLight only supports"html"(other values are written as.htmlwith a warning).seriescolor::Array: Set different colors for the plotstitle::String = "Title": Set a title for the plotsstack::Bool = true: stack plot tracesbar::Bool: create bar plotnofill::Bool: force empty area fillstair::Bool: Make a stair plot instead of a stack plotlabel_fn::Function = label_short: function applied to legend labels (typically the rawVariable__Componentstrings produced by PowerAnalytics). Built-in options:label_short,label_component,label_variable,label_acronym,label_first_word,label_truncate(n). Note that whencombine_categories = true(the default forplot_powerdata,plot_results, andplot_fuel), columns are aggregated to category names beforelabel_fnruns — those names don't contain__, so the defaultlabel_shortis a no-op. Passcombine_categories = falseto see the effect oflabel_fnon the raw labels.legend_position::Symbol = :right: legend placement,:rightor:bottomlegend_font_size::Number: override the legend label font size
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
plot: existing plot handle returned by a previous PowerGraphics plot call such asplot_demandres::Union{InfrastructureSystems.Results,PowerSystems.System}: AResultsobject (e.g.,PowerSimulations.SimulationProblemResults) orPowerSystems.Systemto plot the demand from
Accepted Key Words
linestyle::Symbol = :dash: set line styletitle::String: Set a title for the plotshorizon::Int64: To plot a shorter window of time than the full resultsinitial_time::DateTime: To start the plot at a different time other than the results initial timeaggregate::String = "System", "PowerLoad", or "Bus": aggregate the demand byPowerSystems.System,PowerSystems.PowerLoad, orPowerSystems.Bus, rather than by generatorset_display::Bool = true: set to false to prevent the plots from displayingsave::String = "file_path": set a file path to save the plotsformat::String = "png": file extension for saved plots. CairoMakie supports"png","pdf","svg". PlotlyLight only supports"html"(other values are written as.htmlwith a warning).seriescolor::Array: Set different colors for the plotstitle::String = "Title": Set a title for the plotsstack::Bool = true: stack plot tracesbar::Bool: create bar plotnofill::Bool: force empty area fillstair::Bool: Make a stair plot instead of a stack plotlabel_fn::Function = label_short: function applied to legend labels (typically the rawVariable__Componentstrings produced by PowerAnalytics). Built-in options:label_short,label_component,label_variable,label_acronym,label_first_word,label_truncate(n). Note that whencombine_categories = true(the default forplot_powerdata,plot_results, andplot_fuel), columns are aggregated to category names beforelabel_fnruns — those names don't contain__, so the defaultlabel_shortis a no-op. Passcombine_categories = falseto see the effect oflabel_fnon the raw labels.legend_position::Symbol = :right: legend placement,:rightor:bottomlegend_font_size::Number: override the legend label font sizefilter_func::Function =PowerSystems.get_available: filter components included in plotpalette: color palette fromload_palette
PowerGraphics.plot_demand — Method
plot_demand(results)
plot_demand(system)Plots the demand in the system.
Arguments
res::Union{InfrastructureSystems.Results,PowerSystems.System}: AResultsobject (e.g.,PowerSimulations.SimulationProblemResults) orPowerSystems.Systemto plot the demand from
Example
res = PowerSimulations.solve_op_problem!(OpProblem)
plot = plot_demand(res)Accepted Key Words
linestyle::Symbol = :dash: set line styletitle::String: Set a title for the plotshorizon::Int64: To plot a shorter window of time than the full resultsinitial_time::DateTime: To start the plot at a different time other than the results initial timeaggregate::String = "System", "PowerLoad", or "Bus": aggregate the demand other than by generatorset_display::Bool = true: set to false to prevent the plots from displayingsave::String = "file_path": set a file path to save the plotsformat::String = "png": file extension for saved plots. CairoMakie supports"png","pdf","svg". PlotlyLight only supports"html"(other values are written as.htmlwith a warning).seriescolor::Array: Set different colors for the plotstitle::String = "Title": Set a title for the plotsstack::Bool = true: stack plot tracesbar::Bool: create bar plotnofill::Bool: force empty area fillstair::Bool: Make a stair plot instead of a stack plotlabel_fn::Function = label_short: function applied to legend labels (typically the rawVariable__Componentstrings produced by PowerAnalytics). Built-in options:label_short,label_component,label_variable,label_acronym,label_first_word,label_truncate(n). Note that whencombine_categories = true(the default forplot_powerdata,plot_results, andplot_fuel), columns are aggregated to category names beforelabel_fnruns — those names don't contain__, so the defaultlabel_shortis a no-op. Passcombine_categories = falseto see the effect oflabel_fnon the raw labels.legend_position::Symbol = :right: legend placement,:rightor:bottomlegend_font_size::Number: override the legend label font sizefilter_func::Function =PowerSystems.get_available: filter components included in plot
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
plot: existing plot handle returned by a previous PowerGraphics plot call such asplot_demandres::Union{InfrastructureSystems.Results,PowerSystems.System}: AResultsobject (e.g.,PowerSimulations.SimulationProblemResults) orPowerSystems.Systemto plot the demand from
Accepted Key Words
linestyle::Symbol = :dash: set line styletitle::String: Set a title for the plotshorizon::Int64: To plot a shorter window of time than the full resultsinitial_time::DateTime: To start the plot at a different time other than the results initial timeaggregate::String = "System", "PowerLoad", or "Bus": aggregate the demand byPowerSystems.System,PowerSystems.PowerLoad, orPowerSystems.Bus, rather than by generatorset_display::Bool = true: set to false to prevent the plots from displayingsave::String = "file_path": set a file path to save the plotsformat::String = "png": file extension for saved plots. CairoMakie supports"png","pdf","svg". PlotlyLight only supports"html"(other values are written as.htmlwith a warning).seriescolor::Array: Set different colors for the plotstitle::String = "Title": Set a title for the plotsstack::Bool = true: stack plot tracesbar::Bool: create bar plotnofill::Bool: force empty area fillstair::Bool: Make a stair plot instead of a stack plotlabel_fn::Function = label_short: function applied to legend labels (typically the rawVariable__Componentstrings produced by PowerAnalytics). Built-in options:label_short,label_component,label_variable,label_acronym,label_first_word,label_truncate(n). Note that whencombine_categories = true(the default forplot_powerdata,plot_results, andplot_fuel), columns are aggregated to category names beforelabel_fnruns — those names don't contain__, so the defaultlabel_shortis a no-op. Passcombine_categories = falseto see the effect oflabel_fnon the raw labels.legend_position::Symbol = :right: legend placement,:rightor:bottomlegend_font_size::Number: override the legend label font sizefilter_func::Function =PowerSystems.get_available: filter components included in plotpalette: color palette fromload_palette
PowerGraphics.plot_demand_plotly — Method
plot_demand(results)
plot_demand(system)Plots the demand in the system.
Arguments
res::Union{InfrastructureSystems.Results,PowerSystems.System}: AResultsobject (e.g.,PowerSimulations.SimulationProblemResults) orPowerSystems.Systemto plot the demand from
Example
res = PowerSimulations.solve_op_problem!(OpProblem)
plot = plot_demand(res)Accepted Key Words
linestyle::Symbol = :dash: set line styletitle::String: Set a title for the plotshorizon::Int64: To plot a shorter window of time than the full resultsinitial_time::DateTime: To start the plot at a different time other than the results initial timeaggregate::String = "System", "PowerLoad", or "Bus": aggregate the demand other than by generatorset_display::Bool = true: set to false to prevent the plots from displayingsave::String = "file_path": set a file path to save the plotsformat::String = "png": file extension for saved plots. CairoMakie supports"png","pdf","svg". PlotlyLight only supports"html"(other values are written as.htmlwith a warning).seriescolor::Array: Set different colors for the plotstitle::String = "Title": Set a title for the plotsstack::Bool = true: stack plot tracesbar::Bool: create bar plotnofill::Bool: force empty area fillstair::Bool: Make a stair plot instead of a stack plotlabel_fn::Function = label_short: function applied to legend labels (typically the rawVariable__Componentstrings produced by PowerAnalytics). Built-in options:label_short,label_component,label_variable,label_acronym,label_first_word,label_truncate(n). Note that whencombine_categories = true(the default forplot_powerdata,plot_results, andplot_fuel), columns are aggregated to category names beforelabel_fnruns — those names don't contain__, so the defaultlabel_shortis a no-op. Passcombine_categories = falseto see the effect oflabel_fnon the raw labels.legend_position::Symbol = :right: legend placement,:rightor:bottomlegend_font_size::Number: override the legend label font sizefilter_func::Function =PowerSystems.get_available: filter components included in plot
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
plot: existing plot handle returned by a previous PowerGraphics plot call (optional; e.g.plot_fuel)res::InfrastructureSystems.Results: AResultsobject (e.g.,PowerSimulations.SimulationProblemResults) to be plotted
Accepted Key Words
generator_mapping_file= "file_path" : file path to yaml defining generator category by fuel and primemovervariables::Union{Nothing, Vector{Symbol}}= nothing : specific variables to plotslacks::Bool = true: display slack variablesload::Bool = true: display load linecurtailment::Bool = true: To plot the curtailment in the stack plotset_display::Bool = true: set to false to prevent the plots from displayingsave::String = "file_path": set a file path to save the plotsformat::String = "png": file extension for saved plots. CairoMakie supports"png","pdf","svg". PlotlyLight only supports"html"(other values are written as.htmlwith a warning).seriescolor::Array: Set different colors for the plotstitle::String = "Title": Set a title for the plotsstack::Bool = true: stack plot tracesbar::Bool: create bar plotnofill::Bool: force empty area fillstair::Bool: Make a stair plot instead of a stack plotlabel_fn::Function = label_short: function applied to legend labels (typically the rawVariable__Componentstrings produced by PowerAnalytics). Built-in options:label_short,label_component,label_variable,label_acronym,label_first_word,label_truncate(n). Note that whencombine_categories = true(the default forplot_powerdata,plot_results, andplot_fuel), columns are aggregated to category names beforelabel_fnruns — those names don't contain__, so the defaultlabel_shortis a no-op. Passcombine_categories = falseto see the effect oflabel_fnon the raw labels.legend_position::Symbol = :right: legend placement,:rightor:bottomlegend_font_size::Number: override the legend label font sizefilter_func::Function =PowerSystems.get_available: filter components included in plotpalette: Color palette as fromload_palette.
PowerGraphics.plot_fuel — Method
plot_fuel(results)Plots a stack plot of the results by fuel type and assigns each fuel type a specific color.
Arguments
res::InfrastructureSystems.Results: AResultsobject (e.g.,PowerSimulations.SimulationProblemResults) to be plottedExample
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 primemovervariables::Union{Nothing, Vector{Symbol}}= nothing : specific variables to plotslacks::Bool = true: display slack variablesload::Bool = true: display load linecurtailment::Bool = true: To plot the curtailment in the stack plotset_display::Bool = true: set to false to prevent the plots from displayingsave::String = "file_path": set a file path to save the plotsformat::String = "png": file extension for saved plots. CairoMakie supports"png","pdf","svg". PlotlyLight only supports"html"(other values are written as.htmlwith a warning).seriescolor::Array: Set different colors for the plotstitle::String = "Title": Set a title for the plotsstack::Bool = true: stack plot tracesbar::Bool: create bar plotnofill::Bool: force empty area fillstair::Bool: Make a stair plot instead of a stack plotlabel_fn::Function = label_short: function applied to legend labels (typically the rawVariable__Componentstrings produced by PowerAnalytics). Built-in options:label_short,label_component,label_variable,label_acronym,label_first_word,label_truncate(n). Note that whencombine_categories = true(the default forplot_powerdata,plot_results, andplot_fuel), columns are aggregated to category names beforelabel_fnruns — those names don't contain__, so the defaultlabel_shortis a no-op. Passcombine_categories = falseto see the effect oflabel_fnon the raw labels.legend_position::Symbol = :right: legend placement,:rightor:bottomlegend_font_size::Number: override the legend label font sizefilter_func::Function =PowerSystems.get_available: filter components included in plot
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
plot: existing plot handle returned by a previous PowerGraphics plot call (optional; e.g.plot_fuel)res::InfrastructureSystems.Results: AResultsobject (e.g.,PowerSimulations.SimulationProblemResults) to be plotted
Accepted Key Words
generator_mapping_file= "file_path" : file path to yaml defining generator category by fuel and primemovervariables::Union{Nothing, Vector{Symbol}}= nothing : specific variables to plotslacks::Bool = true: display slack variablesload::Bool = true: display load linecurtailment::Bool = true: To plot the curtailment in the stack plotset_display::Bool = true: set to false to prevent the plots from displayingsave::String = "file_path": set a file path to save the plotsformat::String = "png": file extension for saved plots. CairoMakie supports"png","pdf","svg". PlotlyLight only supports"html"(other values are written as.htmlwith a warning).seriescolor::Array: Set different colors for the plotstitle::String = "Title": Set a title for the plotsstack::Bool = true: stack plot tracesbar::Bool: create bar plotnofill::Bool: force empty area fillstair::Bool: Make a stair plot instead of a stack plotlabel_fn::Function = label_short: function applied to legend labels (typically the rawVariable__Componentstrings produced by PowerAnalytics). Built-in options:label_short,label_component,label_variable,label_acronym,label_first_word,label_truncate(n). Note that whencombine_categories = true(the default forplot_powerdata,plot_results, andplot_fuel), columns are aggregated to category names beforelabel_fnruns — those names don't contain__, so the defaultlabel_shortis a no-op. Passcombine_categories = falseto see the effect oflabel_fnon the raw labels.legend_position::Symbol = :right: legend placement,:rightor:bottomlegend_font_size::Number: override the legend label font sizefilter_func::Function =PowerSystems.get_available: filter components included in plotpalette: Color palette as fromload_palette.
PowerGraphics.plot_fuel_plotly — Method
plot_fuel(results)Plots a stack plot of the results by fuel type and assigns each fuel type a specific color.
Arguments
res::InfrastructureSystems.Results: AResultsobject (e.g.,PowerSimulations.SimulationProblemResults) to be plottedExample
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 primemovervariables::Union{Nothing, Vector{Symbol}}= nothing : specific variables to plotslacks::Bool = true: display slack variablesload::Bool = true: display load linecurtailment::Bool = true: To plot the curtailment in the stack plotset_display::Bool = true: set to false to prevent the plots from displayingsave::String = "file_path": set a file path to save the plotsformat::String = "png": file extension for saved plots. CairoMakie supports"png","pdf","svg". PlotlyLight only supports"html"(other values are written as.htmlwith a warning).seriescolor::Array: Set different colors for the plotstitle::String = "Title": Set a title for the plotsstack::Bool = true: stack plot tracesbar::Bool: create bar plotnofill::Bool: force empty area fillstair::Bool: Make a stair plot instead of a stack plotlabel_fn::Function = label_short: function applied to legend labels (typically the rawVariable__Componentstrings produced by PowerAnalytics). Built-in options:label_short,label_component,label_variable,label_acronym,label_first_word,label_truncate(n). Note that whencombine_categories = true(the default forplot_powerdata,plot_results, andplot_fuel), columns are aggregated to category names beforelabel_fnruns — those names don't contain__, so the defaultlabel_shortis a no-op. Passcombine_categories = falseto see the effect oflabel_fnon the raw labels.legend_position::Symbol = :right: legend placement,:rightor:bottomlegend_font_size::Number: override the legend label font sizefilter_func::Function =PowerSystems.get_available: filter components included in plot
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: ThePowerDataobject to be plotted
Accepted Key Words
combine_categories::Bool = false: plot category values or each value in a categorycurtailment::Bool: plot the curtailment with the variableset_display::Bool = true: set to false to prevent the plots from displayingsave::String = "file_path": set a file path to save the plotsformat::String = "png": file extension for saved plots. CairoMakie supports"png","pdf","svg". PlotlyLight only supports"html"(other values are written as.htmlwith a warning).seriescolor::Array: Set different colors for the plotstitle::String = "Title": Set a title for the plotsstack::Bool = true: stack plot tracesbar::Bool: create bar plotnofill::Bool: force empty area fillstair::Bool: Make a stair plot instead of a stack plotlabel_fn::Function = label_short: function applied to legend labels (typically the rawVariable__Componentstrings produced by PowerAnalytics). Built-in options:label_short,label_component,label_variable,label_acronym,label_first_word,label_truncate(n). Note that whencombine_categories = true(the default forplot_powerdata,plot_results, andplot_fuel), columns are aggregated to category names beforelabel_fnruns — those names don't contain__, so the defaultlabel_shortis a no-op. Passcombine_categories = falseto see the effect oflabel_fnon the raw labels.legend_position::Symbol = :right: legend placement,:rightor:bottomlegend_font_size::Number: override the legend label font size
PowerGraphics.plot_powerdata — Method
plot_powerdata(powerdata)Makes a plot from a PowerAnalytics.PowerData object, such as the result of PowerAnalytics.get_generation_data
Arguments
powerdata::PowerAnalytics.PowerData: ThePowerDataobject to be plotted
Accepted Key Words
combine_categories::Bool = false: plot category values or each value in a categorycurtailment::Bool: plot the curtailment with the variableset_display::Bool = true: set to false to prevent the plots from displayingsave::String = "file_path": set a file path to save the plotsformat::String = "png": file extension for saved plots. CairoMakie supports"png","pdf","svg". PlotlyLight only supports"html"(other values are written as.htmlwith a warning).seriescolor::Array: Set different colors for the plotstitle::String = "Title": Set a title for the plotsstack::Bool = true: stack plot tracesbar::Bool: create bar plotnofill::Bool: force empty area fillstair::Bool: Make a stair plot instead of a stack plotlabel_fn::Function = label_short: function applied to legend labels (typically the rawVariable__Componentstrings produced by PowerAnalytics). Built-in options:label_short,label_component,label_variable,label_acronym,label_first_word,label_truncate(n). Note that whencombine_categories = true(the default forplot_powerdata,plot_results, andplot_fuel), columns are aggregated to category names beforelabel_fnruns — those names don't contain__, so the defaultlabel_shortis a no-op. Passcombine_categories = falseto see the effect oflabel_fnon the raw labels.legend_position::Symbol = :right: legend placement,:rightor:bottomlegend_font_size::Number: override the legend label font size
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: ThePowerDataobject to be plotted
Accepted Key Words
combine_categories::Bool = false: plot category values or each value in a categorycurtailment::Bool: plot the curtailment with the variableset_display::Bool = true: set to false to prevent the plots from displayingsave::String = "file_path": set a file path to save the plotsformat::String = "png": file extension for saved plots. CairoMakie supports"png","pdf","svg". PlotlyLight only supports"html"(other values are written as.htmlwith a warning).seriescolor::Array: Set different colors for the plotstitle::String = "Title": Set a title for the plotsstack::Bool = true: stack plot tracesbar::Bool: create bar plotnofill::Bool: force empty area fillstair::Bool: Make a stair plot instead of a stack plotlabel_fn::Function = label_short: function applied to legend labels (typically the rawVariable__Componentstrings produced by PowerAnalytics). Built-in options:label_short,label_component,label_variable,label_acronym,label_first_word,label_truncate(n). Note that whencombine_categories = true(the default forplot_powerdata,plot_results, andplot_fuel), columns are aggregated to category names beforelabel_fnruns — those names don't contain__, so the defaultlabel_shortis a no-op. Passcombine_categories = falseto see the effect oflabel_fnon the raw labels.legend_position::Symbol = :right: legend placement,:rightor:bottomlegend_font_size::Number: override the legend label font size
PowerGraphics.plot_powerdata_plotly — Method
plot_powerdata(powerdata)Makes a plot from a PowerAnalytics.PowerData object, such as the result of PowerAnalytics.get_generation_data
Arguments
powerdata::PowerAnalytics.PowerData: ThePowerDataobject to be plotted
Accepted Key Words
combine_categories::Bool = false: plot category values or each value in a categorycurtailment::Bool: plot the curtailment with the variableset_display::Bool = true: set to false to prevent the plots from displayingsave::String = "file_path": set a file path to save the plotsformat::String = "png": file extension for saved plots. CairoMakie supports"png","pdf","svg". PlotlyLight only supports"html"(other values are written as.htmlwith a warning).seriescolor::Array: Set different colors for the plotstitle::String = "Title": Set a title for the plotsstack::Bool = true: stack plot tracesbar::Bool: create bar plotnofill::Bool: force empty area fillstair::Bool: Make a stair plot instead of a stack plotlabel_fn::Function = label_short: function applied to legend labels (typically the rawVariable__Componentstrings produced by PowerAnalytics). Built-in options:label_short,label_component,label_variable,label_acronym,label_first_word,label_truncate(n). Note that whencombine_categories = true(the default forplot_powerdata,plot_results, andplot_fuel), columns are aggregated to category names beforelabel_fnruns — those names don't contain__, so the defaultlabel_shortis a no-op. Passcombine_categories = falseto see the effect oflabel_fnon the raw labels.legend_position::Symbol = :right: legend placement,:rightor:bottomlegend_font_size::Number: override the legend label font size
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 categorycurtailment::Bool: plot the curtailment with the variableset_display::Bool = true: set to false to prevent the plots from displayingsave::String = "file_path": set a file path to save the plotsformat::String = "png": file extension for saved plots. CairoMakie supports"png","pdf","svg". PlotlyLight only supports"html"(other values are written as.htmlwith a warning).seriescolor::Array: Set different colors for the plotstitle::String = "Title": Set a title for the plotsstack::Bool = true: stack plot tracesbar::Bool: create bar plotnofill::Bool: force empty area fillstair::Bool: Make a stair plot instead of a stack plotlabel_fn::Function = label_short: function applied to legend labels (typically the rawVariable__Componentstrings produced by PowerAnalytics). Built-in options:label_short,label_component,label_variable,label_acronym,label_first_word,label_truncate(n). Note that whencombine_categories = true(the default forplot_powerdata,plot_results, andplot_fuel), columns are aggregated to category names beforelabel_fnruns — those names don't contain__, so the defaultlabel_shortis a no-op. Passcombine_categories = falseto see the effect oflabel_fnon the raw labels.legend_position::Symbol = :right: legend placement,:rightor:bottomlegend_font_size::Number: override the legend label font size
PowerGraphics.plot_results — Method
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 categorycurtailment::Bool: plot the curtailment with the variableset_display::Bool = true: set to false to prevent the plots from displayingsave::String = "file_path": set a file path to save the plotsformat::String = "png": file extension for saved plots. CairoMakie supports"png","pdf","svg". PlotlyLight only supports"html"(other values are written as.htmlwith a warning).seriescolor::Array: Set different colors for the plotstitle::String = "Title": Set a title for the plotsstack::Bool = true: stack plot tracesbar::Bool: create bar plotnofill::Bool: force empty area fillstair::Bool: Make a stair plot instead of a stack plotlabel_fn::Function = label_short: function applied to legend labels (typically the rawVariable__Componentstrings produced by PowerAnalytics). Built-in options:label_short,label_component,label_variable,label_acronym,label_first_word,label_truncate(n). Note that whencombine_categories = true(the default forplot_powerdata,plot_results, andplot_fuel), columns are aggregated to category names beforelabel_fnruns — those names don't contain__, so the defaultlabel_shortis a no-op. Passcombine_categories = falseto see the effect oflabel_fnon the raw labels.legend_position::Symbol = :right: legend placement,:rightor:bottomlegend_font_size::Number: override the legend label font size
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 categorycurtailment::Bool: plot the curtailment with the variableset_display::Bool = true: set to false to prevent the plots from displayingsave::String = "file_path": set a file path to save the plotsformat::String = "png": file extension for saved plots. CairoMakie supports"png","pdf","svg". PlotlyLight only supports"html"(other values are written as.htmlwith a warning).seriescolor::Array: Set different colors for the plotstitle::String = "Title": Set a title for the plotsstack::Bool = true: stack plot tracesbar::Bool: create bar plotnofill::Bool: force empty area fillstair::Bool: Make a stair plot instead of a stack plotlabel_fn::Function = label_short: function applied to legend labels (typically the rawVariable__Componentstrings produced by PowerAnalytics). Built-in options:label_short,label_component,label_variable,label_acronym,label_first_word,label_truncate(n). Note that whencombine_categories = true(the default forplot_powerdata,plot_results, andplot_fuel), columns are aggregated to category names beforelabel_fnruns — those names don't contain__, so the defaultlabel_shortis a no-op. Passcombine_categories = falseto see the effect oflabel_fnon the raw labels.legend_position::Symbol = :right: legend placement,:rightor:bottomlegend_font_size::Number: override the legend label font size
PowerGraphics.plot_results_plotly — Method
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 categorycurtailment::Bool: plot the curtailment with the variableset_display::Bool = true: set to false to prevent the plots from displayingsave::String = "file_path": set a file path to save the plotsformat::String = "png": file extension for saved plots. CairoMakie supports"png","pdf","svg". PlotlyLight only supports"html"(other values are written as.htmlwith a warning).seriescolor::Array: Set different colors for the plotstitle::String = "Title": Set a title for the plotsstack::Bool = true: stack plot tracesbar::Bool: create bar plotnofill::Bool: force empty area fillstair::Bool: Make a stair plot instead of a stack plotlabel_fn::Function = label_short: function applied to legend labels (typically the rawVariable__Componentstrings produced by PowerAnalytics). Built-in options:label_short,label_component,label_variable,label_acronym,label_first_word,label_truncate(n). Note that whencombine_categories = true(the default forplot_powerdata,plot_results, andplot_fuel), columns are aggregated to category names beforelabel_fnruns — those names don't contain__, so the defaultlabel_shortis a no-op. Passcombine_categories = falseto see the effect oflabel_fnon the raw labels.legend_position::Symbol = :right: legend placement,:rightor:bottomlegend_font_size::Number: override the legend label font size