aboutsummaryrefslogtreecommitdiffstats
path: root/fun/plot.py
blob: 17a7a7e07c85ff424828f3979d5d471ecd982171 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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")