aboutsummaryrefslogtreecommitdiffstats
path: root/fun/plot.py
diff options
context:
space:
mode:
Diffstat (limited to 'fun/plot.py')
-rw-r--r--fun/plot.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/fun/plot.py b/fun/plot.py
new file mode 100644
index 0000000..17a7a7e
--- /dev/null
+++ b/fun/plot.py
@@ -0,0 +1,14 @@
+from datetime import datetime
+import matplotlib.pyplot as plt
+
+dates = [datetime.strptime(date.strip(), "%Y-%m-%dT%H:%M:%S")
+ for date in open("commits.txt")]
+
+dates = dates[:148]
+dates, commits = zip(*[(date, i) for (i, date) in enumerate(sorted(dates))])
+fig = plt.figure()
+plt.plot(dates, commits)
+plt.grid()
+plt.ylabel("Cumulative commits")
+fig.autofmt_xdate()
+plt.savefig("commits.pdf")