Add annotation, fixes
@@ -205,6 +205,8 @@ def run_sim(sim_pars=None, epi_pars=None, verbose=True):
interv_day = sim['interv_days'][0]
if interv_day > 0 and interv_day < sim['n_days']:
fig.add_shape(dict(type="line", xref="x", yref="paper", x0=interv_day, x1=interv_day, y0=0, y1=1, name='Intervention', line=dict(width=0.5, dash='dash')))
+ fig.update_layout(annotations=[dict(x=interv_day, y=1, xref="x", yref="paper", text="Intervention start", showarrow=False)])
+
fig.update_layout(title={'text':title}, xaxis_title='Day', yaxis_title='Count', autosize=True)
output = {'json': fig.to_json(), 'id': str(sc.uuid())}
