Skip to content

Commit

Permalink
clear previous plot in case of leftovers
Browse files Browse the repository at this point in the history
  • Loading branch information
MikaelSiidorow committed Sep 10, 2022
1 parent 824af94 commit fb8a33b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions kipubot/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit fb8a33b

Please sign in to comment.