Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
GEM
gem
Commits
e8d5f8ab
Commit
e8d5f8ab
authored
Nov 12, 2019
by
Chris Jewell
Browse files
Updated plot_timeseries to plot for multiple states.
parent
40ee1ced
Pipeline
#278
passed with stage
in 4 minutes and 53 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
gem/plotting/timeseries.py
View file @
e8d5f8ab
...
...
@@ -44,11 +44,12 @@ def plot_timeseries(epi, event_list, show=True):
epi
.
process
.
time_origin
,
epi
.
process
.
stoichiometry
))
plt
.
rc
(
'axes'
,
prop_cycle
=
(
cycler
(
'color'
,
[
'b'
,
'r'
,
'g'
,
'c'
,
'y'
,
'm'
])))
for
s_num
,
state
in
enumerate
(
epi
.
process
.
states
):
plt
.
step
(
time_series
[
0
],
time_series
[
1
][
s_num
,
:,
:].
sum
(
axis
=
1
),
where
=
'post'
,
label
=
state
)
# plt.rc('axes',
# prop_cycle=(cycler('color', ['b', 'r', 'g', 'c', 'y', 'm'])))
color_cycle
=
cycler
(
'color'
,
[
'b'
,
'r'
,
'g'
,
'c'
,
'y'
,
'm'
])
for
s_num
,
(
state
,
color
)
in
enumerate
(
zip
(
epi
.
process
.
states
,
color_cycle
)):
plt
.
step
(
time_series
[
0
],
time_series
[
1
][:,
:,
s_num
],
where
=
'post'
,
label
=
state
,
color
=
color
[
'color'
])
plt
.
legend
()
if
show
:
plt
.
show
()
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment