From 1b36d2a4b4d04eaea480037d0456767200dba73e Mon Sep 17 00:00:00 2001 From: Thibaut Horel Date: Mon, 9 Mar 2015 16:03:44 -0400 Subject: Add fun stuff --- fun/plot.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 fun/plot.py (limited to 'fun/plot.py') 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") -- cgit v1.2.3-70-g09d2