diff options
author | jwansek <eddie.atten.ea29@gmail.com> | 2021-04-19 21:54:00 +0100 |
---|---|---|
committer | jwansek <eddie.atten.ea29@gmail.com> | 2021-04-19 21:54:00 +0100 |
commit | 171daf88a753d5683dda695ff83013ae90a76809 (patch) | |
tree | 00fb9c7aafe4cd708b4ad27937663ac4c12620df /graph.py | |
parent | 6f29d39a9727688f7f4b25670614abbe66baa957 (diff) | |
download | SmallYTChannelBot-171daf88a753d5683dda695ff83013ae90a76809.tar.gz SmallYTChannelBot-171daf88a753d5683dda695ff83013ae90a76809.zip |
fixed some bugs
Diffstat (limited to 'graph.py')
-rwxr-xr-x | graph.py | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/graph.py b/graph.py deleted file mode 100755 index 723997b..0000000 --- a/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 |