Skip to content
Snippets Groups Projects
Commit 5905bce2 authored by Julian Stürmer's avatar Julian Stürmer
Browse files

Add new drawing options and clean up some code

parent dbb082af
No related branches found
No related tags found
No related merge requests found
......@@ -70,10 +70,10 @@ function scatter_branchloads(
coloring = bl_diff
coloring[coloring .== 0.0] .= -10 # for unique coloring of 0.0
else
cmap_range = settings["cmap-range"]
throw(ArgumentError("Unknown cmap_range $cmap_range."))
throw(ArgumentError("Unknown cmap_range $(settings["cmap_range"])."))
end
### Colormap
pycopy = pyimport("copy")
cmap = pycopy.copy(plt.get_cmap(settings["cmap"]))
cmap.set_under(color="tab:green") # color perfect matches green
......
This diff is collapsed.
......@@ -60,6 +60,8 @@ function _default_settings(func::Symbol)
if func == :plot_pg
defaults = Dict(
### Settings for _draw_buses!
"bus_coloring" => "type", # or "voltage"
"bus_cmap_range" => "tolerance", # or "relative"
"Buses" => Dict(
"Generator" => Dict(
"marker" => "s",
......@@ -105,8 +107,9 @@ function _default_settings(func::Symbol)
),
### Settings for _draw_branches!
"Branches" => Dict(
"br_status" => "active", # plot only "active", "inactive" or "all" branches
"br_status" => "active", # "active", "inactive", "damage", "all"
"br_coloring" => "equal", # how to color branches (can be set to "equal", "voltage", "MW-loading", "Mvar-loading" or "MVA-loading")
"br_arrows" => false, # whether to draw flow direction arrows
"br_color" => "k", # default color for "equal" coloring
"br_lw" => 2,
"br_alpha" => 1
......@@ -117,11 +120,13 @@ function _default_settings(func::Symbol)
"alpha" => 1,
"cbar_label" => L"\mathrm{Wind\, speed\, in\,} m/s"
),
"area" => (-105.1379, -93.8541, 25.4171, 36.3269),
"area_offset" => 0.4,
"draw_ticks" => [true, true, true, true], # whether to show ticks
"draw_legend" => true, # whether to draw a legend
"xlabel" => L"Longitude in $°$",
"ylabel" => L"Latitude in $°$"
"ylabel" => L"Latitude in $°$",
"N_areas" => 8 # number of areas (important for plot_pg_areas)
)
elseif func == :plot_pg_overhead_tl_segments
defaults = Dict(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment