Skip to content

Commit

Permalink
Merge branch 'main' of git.hhu.de:medbio/research/pgr into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Doerr committed Oct 20, 2023
2 parents db65bd3 + 92e24f1 commit b3b379d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/panacus-visualize.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ def plot_growth(df, axs, loc='lower left', estimate_growth=False):
df[(t, ct, c, q)].plot.bar(color=f'C{i}', label=f'coverage $\geq {c}$, quorum $\geq {q*100:.0f}$%', ax=axs[0])
if c <= 1 and q <= 1/df.shape[0]:
if estimate_growth:
popt, curve = fit_gamma(df[(t, ct, c,q)].array)
popt, curve = fit_gamma(df.loc[1:, (t, ct, c,q)].array)
popts.append((c, q, popt, i))
axs[0].plot(curve, '--', color='black', label=f'coverage $\geq {c}$, quorum $\geq {q*100:.0f}$%, $k_1 X^γ$ with $k_1$={humanize_number(popt[0],1)}, γ={popt[1]:.3f})')
axs[0].plot(df.loc[1:].index, curve, '--', color='black', label=f'coverage $\geq {c}$, quorum $\geq {q*100:.0f}$%, $k_1 X^γ$ with $k_1$={humanize_number(popt[0],1)}, γ={popt[1]:.3f})')
else:
popts.append((c, q, None, i))
axs[0].set_xticklabels(axs[0].get_xticklabels(), rotation=65)
Expand Down

0 comments on commit b3b379d

Please sign in to comment.