From 25f5453e1c3ae43bb3244624410b88b66c2419eb Mon Sep 17 00:00:00 2001 From: nexy7574 Date: Tue, 16 Apr 2024 13:14:31 +0100 Subject: [PATCH] Clear plot when used --- src/cogs/quote_quota.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cogs/quote_quota.py b/src/cogs/quote_quota.py index 6b508b4..f8a9dd3 100644 --- a/src/cogs/quote_quota.py +++ b/src/cogs/quote_quota.py @@ -67,6 +67,7 @@ class QuoteQuota(commands.Cog): usernames = list(new_mapping.keys()) counts = list(new_mapping.values()) + plt.clf() fig, ax = plt.subplots(figsize=(7, 7)) ax.pie( counts, @@ -264,6 +265,7 @@ class QuoteQuota(commands.Cog): :return: A discord.File with the rendered graph """ hrs = [x.zfill(2) for x in hours.keys()] + plt.clf() plt.title("Truth times") plt.xlabel("Hour") plt.ylabel("Truths")