Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
ITCPG.jl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Julian Stuermer
ITCPG.jl
Commits
5905bce2
Commit
5905bce2
authored
3 years ago
by
Julian Stürmer
Browse files
Options
Downloads
Patches
Plain Diff
Add new drawing options and clean up some code
parent
dbb082af
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/PlotPFC.jl
+2
-2
2 additions, 2 deletions
src/PlotPFC.jl
src/PlotPG.jl
+722
-21
722 additions, 21 deletions
src/PlotPG.jl
src/PlotUtils.jl
+7
-2
7 additions, 2 deletions
src/PlotUtils.jl
with
731 additions
and
25 deletions
src/PlotPFC.jl
+
2
−
2
View file @
5905bce2
...
@@ -70,10 +70,10 @@ function scatter_branchloads(
...
@@ -70,10 +70,10 @@ function scatter_branchloads(
coloring
=
bl_diff
coloring
=
bl_diff
coloring
[
coloring
.==
0.0
]
.=
-
10
# for unique coloring of 0.0
coloring
[
coloring
.==
0.0
]
.=
-
10
# for unique coloring of 0.0
else
else
cmap_range
=
settings
[
"cmap-range"
]
throw
(
ArgumentError
(
"Unknown cmap_range
$
(settings["
cmap_range
"])."
))
throw
(
ArgumentError
(
"Unknown cmap_range
$
cmap_range."
))
end
end
### Colormap
pycopy
=
pyimport
(
"copy"
)
pycopy
=
pyimport
(
"copy"
)
cmap
=
pycopy
.
copy
(
plt
.
get_cmap
(
settings
[
"cmap"
]))
cmap
=
pycopy
.
copy
(
plt
.
get_cmap
(
settings
[
"cmap"
]))
cmap
.
set_under
(
color
=
"tab:green"
)
# color perfect matches green
cmap
.
set_under
(
color
=
"tab:green"
)
# color perfect matches green
...
...
This diff is collapsed.
Click to expand it.
src/PlotPG.jl
+
722
−
21
View file @
5905bce2
This diff is collapsed.
Click to expand it.
src/PlotUtils.jl
+
7
−
2
View file @
5905bce2
...
@@ -60,6 +60,8 @@ function _default_settings(func::Symbol)
...
@@ -60,6 +60,8 @@ function _default_settings(func::Symbol)
if
func
==
:
plot_pg
if
func
==
:
plot_pg
defaults
=
Dict
(
defaults
=
Dict
(
### Settings for _draw_buses!
### Settings for _draw_buses!
"bus_coloring"
=>
"type"
,
# or "voltage"
"bus_cmap_range"
=>
"tolerance"
,
# or "relative"
"Buses"
=>
Dict
(
"Buses"
=>
Dict
(
"Generator"
=>
Dict
(
"Generator"
=>
Dict
(
"marker"
=>
"s"
,
"marker"
=>
"s"
,
...
@@ -105,8 +107,9 @@ function _default_settings(func::Symbol)
...
@@ -105,8 +107,9 @@ function _default_settings(func::Symbol)
),
),
### Settings for _draw_branches!
### Settings for _draw_branches!
"Branches"
=>
Dict
(
"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_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_color"
=>
"k"
,
# default color for "equal" coloring
"br_lw"
=>
2
,
"br_lw"
=>
2
,
"br_alpha"
=>
1
"br_alpha"
=>
1
...
@@ -117,11 +120,13 @@ function _default_settings(func::Symbol)
...
@@ -117,11 +120,13 @@ function _default_settings(func::Symbol)
"alpha"
=>
1
,
"alpha"
=>
1
,
"cbar_label"
=>
L"\mathrm{Wind\, speed\, in\,} m/s"
"cbar_label"
=>
L"\mathrm{Wind\, speed\, in\,} m/s"
),
),
"area"
=>
(
-
105.1379
,
-
93.8541
,
25.4171
,
36.3269
),
"area_offset"
=>
0.4
,
"area_offset"
=>
0.4
,
"draw_ticks"
=>
[
true
,
true
,
true
,
true
],
# whether to show ticks
"draw_ticks"
=>
[
true
,
true
,
true
,
true
],
# whether to show ticks
"draw_legend"
=>
true
,
# whether to draw a legend
"draw_legend"
=>
true
,
# whether to draw a legend
"xlabel"
=>
L"Longitude in
$
°
$
"
,
"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
elseif
func
==
:
plot_pg_overhead_tl_segments
defaults
=
Dict
(
defaults
=
Dict
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment