Clear plot when used
This commit is contained in:
parent
f316351d16
commit
25f5453e1c
1 changed files with 2 additions and 0 deletions
|
@ -67,6 +67,7 @@ class QuoteQuota(commands.Cog):
|
||||||
usernames = list(new_mapping.keys())
|
usernames = list(new_mapping.keys())
|
||||||
counts = list(new_mapping.values())
|
counts = list(new_mapping.values())
|
||||||
|
|
||||||
|
plt.clf()
|
||||||
fig, ax = plt.subplots(figsize=(7, 7))
|
fig, ax = plt.subplots(figsize=(7, 7))
|
||||||
ax.pie(
|
ax.pie(
|
||||||
counts,
|
counts,
|
||||||
|
@ -264,6 +265,7 @@ class QuoteQuota(commands.Cog):
|
||||||
:return: A discord.File with the rendered graph
|
:return: A discord.File with the rendered graph
|
||||||
"""
|
"""
|
||||||
hrs = [x.zfill(2) for x in hours.keys()]
|
hrs = [x.zfill(2) for x in hours.keys()]
|
||||||
|
plt.clf()
|
||||||
plt.title("Truth times")
|
plt.title("Truth times")
|
||||||
plt.xlabel("Hour")
|
plt.xlabel("Hour")
|
||||||
plt.ylabel("Truths")
|
plt.ylabel("Truths")
|
||||||
|
|
Loading…
Reference in a new issue