diff options
| author | jwansek <eddie.atten.ea29@gmail.com> | 2025-10-01 16:25:18 +0100 |
|---|---|---|
| committer | jwansek <eddie.atten.ea29@gmail.com> | 2025-10-01 16:25:18 +0100 |
| commit | db922ff88310724334495f21db2fa6fe3c16e791 (patch) | |
| tree | 31641d518692a422c009f4d4fab8e7e1f231ec75 | |
| parent | 7cd309730e42983178d8f9632d25497dc7e20c22 (diff) | |
| download | SmallYTChannelBot-db922ff88310724334495f21db2fa6fe3c16e791.tar.gz SmallYTChannelBot-db922ff88310724334495f21db2fa6fe3c16e791.zip | |
| -rwxr-xr-x | cron/daily.py | 2 | ||||
| -rwxr-xr-x | cron/graph.py | 31 |
2 files changed, 1 insertions, 32 deletions
diff --git a/cron/daily.py b/cron/daily.py index c7eadab..8e26093 100755 --- a/cron/daily.py +++ b/cron/daily.py @@ -7,7 +7,7 @@ from operator import itemgetter import subreddit import database import datetime -import graph +# import graph def main(): subreddit.display("Starting every day program...") diff --git a/cron/graph.py b/cron/graph.py deleted file mode 100755 index 723997b..0000000 --- a/cron/graph.py +++ /dev/null @@ -1,31 +0,0 @@ -from mpl_toolkits.axes_grid1 import host_subplot -import mpl_toolkits.axisartist as AA -import matplotlib.pyplot as plt -import matplotlib -import datetime - -def make_graph(data): - fig = plt.figure() - - lambdaCount = [i[1] for i in data] - helpGiven = [i[2] for i in data] - uniqueUsers = [i[3] for i in data] - date = [datetime.datetime.strptime(i[4], "%Y-%m-%d") for i in data] - - fig, ax1 = plt.subplots() - ax1.plot(date, lambdaCount, label = "Total λ in circulation", color = "r") - ax1.set_ylabel("Total λ / help given") - - ax1.plot(date, helpGiven, label = "Times help given", color = "g") - - ax2 = ax1.twinx() - ax2.plot(date, uniqueUsers, label = "Unique users") - ax2.set_ylabel("No. Unique Users") - - ax1.legend() - ax2.legend(loc = 4) - fig.autofmt_xdate() - - filepath = "graph.png" - fig.savefig(filepath) - return filepath
\ No newline at end of file |
