Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
BOXMOX Python Package
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
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MBEES
BOXMOX Python Package
Commits
843a9471
Commit
843a9471
authored
7 years ago
by
Christoph.Knote
Browse files
Options
Downloads
Patches
Plain Diff
Finally, some nice plots. Should be it.
parent
ed97e751
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
boxmox/plotter.py
+12
-7
12 additions, 7 deletions
boxmox/plotter.py
with
12 additions
and
7 deletions
boxmox/plotter.py
+
12
−
7
View file @
843a9471
...
...
@@ -47,8 +47,8 @@ class ExperimentPlotter:
def
fluxes
(
self
,
spec
,
fig
=
None
,
ax
=
None
,
plot_legend
=
True
,
plot_netflux
=
True
,
plot_xaxlabels
=
True
,
scale_factor
=
3600.0
*
1000.0
,
xlabel
=
'
Time in h
'
,
ylabel
=
r
'
Flux in ppbv h$^{-1}$
'
,
plabel
=
None
,
scale_factor
=
3600.0
*
1000.0
,
ylim
=
None
,
xlabel
=
'
Time in h
'
,
ylabel
=
r
'
Flux in ppbv h$^{-1}$
'
,
plabel
=
None
,
flx_labels
=
None
,
xaxis
=
True
,
yaxis
=
True
):
'''
Plot time series of fluxes through a species.
...
...
@@ -67,15 +67,20 @@ class ExperimentPlotter:
netflux
=
np
.
zeros
(
len
(
times
))
for
xkey
,
xvalue
in
flx
.
iteritems
():
ax
.
plot
(
times
,
xvalue
*
scale_factor
,
label
=
xkey
)
try
:
ax
.
plot
(
times
,
xvalue
*
scale_factor
,
label
=
flx_labels
[
xkey
][
'
label
'
],
c
=
flx_labels
[
xkey
][
'
color
'
])
except
:
ax
.
plot
(
times
,
xvalue
*
scale_factor
,
label
=
xkey
)
netflux
+=
np
.
array
(
xvalue
)
if
plot_netflux
:
ax
.
plot
(
times
,
netflux
*
scale_factor
,
label
=
"
Net flux
"
,
lw
=
2
,
c
=
'
k
'
)
ax
.
plot
(
times
,
np
.
zeros
(
len
(
times
)),
lw
=
1
,
c
=
'
gray
'
)
ax
.
plot
(
times
,
netflux
*
scale_factor
,
label
=
"
Net flux
"
,
lw
=
1
,
c
=
'
k
'
)
ax
.
grid
(
alpha
=
0.5
)
ax
.
grid
(
alpha
=
0.5
,
color
=
'
gray
'
,
linestyle
=
'
solid
'
)
ax
.
plot
(
times
,
np
.
zeros
(
len
(
times
)),
lw
=
0.5
,
alpha
=
0.5
,
c
=
'
dimgray
'
)
ax
.
set
(
xlim
=
(
times
[
0
],
times
[
-
1
]),
xlabel
=
xlabel
,
ylabel
=
ylabel
)
if
not
ylim
is
None
:
ax
.
set
(
ylim
=
ylim
)
if
not
plabel
is
None
:
xmin
,
xmax
=
ax
.
get_xlim
()
...
...
@@ -84,7 +89,7 @@ class ExperimentPlotter:
horizontalalignment
=
'
center
'
,
verticalalignment
=
'
center
'
)
if
plot_legend
:
ax
.
legend
(
loc
=
'
low
er center
'
,
fontsize
=
"
xx-small
"
,
fancybox
=
True
,
framealpha
=
0.5
)
ax
.
legend
(
loc
=
'
upp
er center
'
,
fontsize
=
"
xx-small
"
,
fancybox
=
True
,
framealpha
=
0.
7
5
)
if
not
plot_xaxlabels
:
ax
.
tick_params
(
labelbottom
=
'
off
'
)
...
...
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