Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
WindEnergyToolbox
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
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
shfe
WindEnergyToolbox
Commits
1eb3ccff
Commit
1eb3ccff
authored
7 years ago
by
David Verelst
Browse files
Options
Downloads
Patches
Plain Diff
prepost: typo in dlctemplate and do not plot empty fig in dlcplots
parent
1b9f19b7
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
wetb/prepost/dlcplots.py
+8
-3
8 additions, 3 deletions
wetb/prepost/dlcplots.py
wetb/prepost/dlctemplate.py
+1
-1
1 addition, 1 deletion
wetb/prepost/dlctemplate.py
with
9 additions
and
4 deletions
wetb/prepost/dlcplots.py
+
8
−
3
View file @
1eb3ccff
...
...
@@ -320,6 +320,9 @@ def plot_dlc_stats(df_stats, plot_chans, fig_dir_base, labels=None,
windoffset
=
[
-
0.2
,
0.2
]
else
:
windoffset
=
[
0
]
# in case of a fully empty plot xlims will remain None and there
# is no need to save the plot
xlims
=
None
# instead of groupby, select the run_dir in the same order as
# occuring in the labels, post_dirs lists
for
ii
,
run_dir
in
enumerate
(
run_dirs
):
...
...
@@ -384,12 +387,14 @@ def plot_dlc_stats(df_stats, plot_chans, fig_dir_base, labels=None,
# if str(dlc_name) not in ['61', '62']:
# ax.set_xticks(gr_ch_dlc_sid['[Windspeed]'].values)
# don't save empyt plots
if
xlims
is
None
:
continue
ax
.
grid
()
ax
.
set_xlim
(
xlims
)
leg
=
ax
.
legend
(
loc
=
'
best
'
,
ncol
=
3
)
# if no data at all was found
if
leg
is
not
None
:
leg
.
get_frame
().
set_alpha
(
0.7
)
leg
.
get_frame
().
set_alpha
(
0.7
)
ax
.
set_title
(
r
'
{DLC%s} %s
'
%
(
dlc_name
,
ch_dscr
))
ax
.
set_xlabel
(
xlabel
)
fig
.
tight_layout
()
...
...
This diff is collapsed.
Click to expand it.
wetb/prepost/dlctemplate.py
+
1
−
1
View file @
1eb3ccff
...
...
@@ -556,7 +556,7 @@ if __name__ == '__main__':
P_RUN
,
P_SOURCE
,
PROJECT
,
sim_id
,
P_MASTERFILE
,
MASTERFILE
,
POST_DIR
\
=
dlcdefs
.
configure_dirs
(
verbose
=
True
)
if
opt
.
gendlc
:
if
opt
.
gendlc
s
:
DLB
=
GenerateDLCCases
()
DLB
.
execute
(
filename
=
os
.
path
.
join
(
P_SOURCE
,
opt
.
dlcmaster
),
folder
=
os
.
path
.
join
(
P_RUN
,
opt
.
dlcfolder
))
...
...
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