diff --git a/kipubot/utils.py b/kipubot/utils.py index d34da1c..4fb22fe 100644 --- a/kipubot/utils.py +++ b/kipubot/utils.py @@ -252,6 +252,8 @@ def generate_graph(out_img_path: str, px, nom, std, lpb, upb = fit_timedata(df['datenum'], df['amount']) # -- plot -- + # clear previous plot in case of leftovers + plt.clf() ax = plt.gca() # plot data df['amount'][:-1].plot(ax=ax, marker='o', style='r', label='Pool') @@ -289,6 +291,8 @@ def generate_expected(out_img_path: str, start_date, _, entry_fee, df = parse_expected(raffle_data) # -- plot -- + # clear previous plot in case of leftovers + plt.clf() ax = plt.gca() df['next_expected'].plot(