Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Commit

Permalink
fix for 1 scenario (#230)
Browse files Browse the repository at this point in the history
Co-authored-by: Elizabeth Lee <eclee25@gmail.com>
  • Loading branch information
Joseph Lemaitre and eclee25 authored Apr 23, 2020
1 parent 805bddc commit fac6e84
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions scripts/fast_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ def generate_pdf(max_files, filename, config_file):
fig, axes = plt.subplots(len(varplot),len(all_hosp_sim), figsize =(23,20), sharex=True)
for vi, var in enumerate(varplot):
for scn, key in enumerate(list(all_hosp_sim.keys())):
ax = axes[vi][scn]
if len(all_hosp_sim) > 1:
ax = axes[vi][scn]
else:
ax = axes[vi]
ax.set_title(key)
ax.xaxis.set_major_locator(plt.MaxNLocator(12))
ax.yaxis.set_major_locator(plt.MaxNLocator(5))
Expand Down Expand Up @@ -226,10 +229,13 @@ def generate_pdf(max_files, filename, config_file):
fig, axes = plt.subplots(len(all_seir_sim_cumI),1, figsize =(15,15), sharex=True)
i=0
for key, value in all_seir_sim_cumI.items():
axes.flat[i]
if len(all_seir_sim_cumI) > 1:
ax = axes.flat[i]
else:
ax = axes
#fig, axes = plt.subplots(1,1, figsize =(10,5))
ax = value.max().hist(ax= axes.flat[i])
axes.flat[i].set_title(f"Final Size {key}")
ax = value.max().hist(ax= ax)
ax.set_title(f"Final Size {key}")
i=i+1
pdf.savefig(fig)

Expand Down

0 comments on commit fac6e84

Please sign in to comment.