diff options
| author | Thibaut Horel <thibaut.horel@gmail.com> | 2015-03-09 16:03:44 -0400 |
|---|---|---|
| committer | Thibaut Horel <thibaut.horel@gmail.com> | 2015-03-09 16:03:44 -0400 |
| commit | 1b36d2a4b4d04eaea480037d0456767200dba73e (patch) | |
| tree | f04a5977dd38d24db3e42a62dc9f681c2607fd1a /fun/plot.py | |
| parent | 843f75943d25f4e180493142b6da0968621b9a78 (diff) | |
| download | cascades-1b36d2a4b4d04eaea480037d0456767200dba73e.tar.gz | |
Add fun stuff
Diffstat (limited to 'fun/plot.py')
| -rw-r--r-- | fun/plot.py | 14 |
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") |
