Commit e8d5f8ab authored by Chris Jewell's avatar 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
......@@ -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()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment