Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
VILLASdataprocessing
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
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
ACS
Public
VILLASframework
VILLASdataprocessing
Commits
b5c1ae4c
Commit
b5c1ae4c
authored
7 years ago
by
Markus Mirz
Browse files
Options
Downloads
Patches
Plain Diff
added legend location as parameter
parent
70b1a1fa
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dataprocessing/plottools.py
+2
-2
2 additions, 2 deletions
dataprocessing/plottools.py
with
2 additions
and
2 deletions
dataprocessing/plottools.py
+
2
−
2
View file @
b5c1ae4c
...
...
@@ -3,7 +3,7 @@ import numpy as np
from
.timeseries
import
*
def
plot_timeseries
(
figure_id
,
timeseries
,
plt_linestyle
=
'
-
'
,
plt_linewidth
=
2
,
plt_color
=
None
):
def
plot_timeseries
(
figure_id
,
timeseries
,
plt_linestyle
=
'
-
'
,
plt_linewidth
=
2
,
plt_color
=
None
,
plt_legend_loc
=
'
lower right
'
):
"""
This function plots either a single timeseries or several timeseries in the figure defined by figure_id.
Several timeseries (handed over in a list) are plotted in several subplots.
...
...
@@ -16,7 +16,7 @@ def plot_timeseries(figure_id, timeseries, plt_linestyle='-', plt_linewidth=2, p
else
:
plt
.
plot
(
timeseries
.
time
,
timeseries
.
values
,
linestyle
=
plt_linestyle
,
label
=
timeseries
.
label
,
linewidth
=
plt_linewidth
)
plt
.
gca
().
autoscale
(
axis
=
'
x
'
,
tight
=
True
)
plt
.
legend
(
loc
=
'
lower right
'
)
plt
.
legend
(
loc
=
plt_legend_loc
)
else
:
for
ts
in
timeseries
:
plt
.
subplot
(
len
(
timeseries
),
1
,
timeseries
.
index
(
ts
)
+
1
)
...
...
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